Mesh Gradient Hero
A copy-paste hero sections component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Hero SectionsHTMLCSSany framework
Built different.
Try freeCopy into your project
HTML
<!-- Mesh Gradient Hero -->
<section class="nuda-hero-m">
<div class="nuda-hero-m__bg"></div>
<div class="nuda-hero-m__content">
<h2>Built different.</h2>
<button class="nuda-hero-m__btn" type="button">Try free</button>
</div>
</section>CSS
/* Mesh Gradient Hero
Animated multi-radial gradient backdrop, glassy overlay, content on top.
Customize: gradient stops & colors, --hm-overlay opacity. */
.nuda-hero-m {
--hm-overlay: 0.6;
position: relative;
width: 100%;
height: 380px;
border-radius: 16px;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
.nuda-hero-m__bg {
position: absolute;
inset: -20%;
background:
radial-gradient(at 30% 30%, #e4ff54 0%, transparent 40%),
radial-gradient(at 70% 70%, #a78bfa 0%, transparent 40%),
radial-gradient(at 50% 100%, #fb7185 0%, transparent 50%);
filter: blur(40px);
opacity: 0.7;
animation: nuda-hm-shift 12s ease-in-out infinite;
}
.nuda-hero-m::before {
content: "";
position: absolute;
inset: 0;
background: #0e0e10;
opacity: var(--hm-overlay);
backdrop-filter: blur(20px);
}
.nuda-hero-m__content {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
text-align: center;
}
.nuda-hero-m__content h2 {
font: 800 clamp(2rem, 5vw, 3.5rem) ui-sans-serif, system-ui, sans-serif;
color: #fafafa;
margin: 0;
letter-spacing: -0.02em;
}
.nuda-hero-m__btn {
padding: 10px 24px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
color: #fafafa;
font: 700 0.95rem ui-sans-serif, system-ui, sans-serif;
border-radius: 999px;
backdrop-filter: blur(8px);
cursor: pointer;
}
@keyframes nuda-hm-shift {
0%, 100% { transform: translate(0, 0) scale(1); }
33% { transform: translate(8%, -4%) scale(1.05); }
66% { transform: translate(-4%, 6%) scale(0.95); }
}
@media (prefers-reduced-motion: reduce) {
.nuda-hero-m__bg { animation: none; }
}How to use Mesh Gradient Hero
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.