Glass Hero
A copy-paste hero sections component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Hero SectionsHTMLCSSany framework
Crystal clear.
Frosted glass, sharp focus.
Try itCopy into your project
HTML
<!-- Glass Hero — frosted glass panel over drifting color blobs -->
<section class="nuda-glassh">
<div class="nuda-glassh__blob nuda-glassh__blob--a"></div>
<div class="nuda-glassh__blob nuda-glassh__blob--b"></div>
<div class="nuda-glassh__panel">
<h2>Crystal clear.</h2>
<p>Frosted glass, sharp focus.</p>
<button class="nuda-glassh__btn" type="button">Try it</button>
</div>
</section>CSS
/* Glass Hero
Glassmorphism panel floating over two drifting color blobs.
Customize: blob colors, --glassh-accent, blur radius. */
.nuda-glassh {
--glassh-accent: #e4ff54;
position: relative;
width: 100%;
height: 420px;
border-radius: 18px;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
background: #09090b;
}
.nuda-glassh__blob {
position: absolute;
width: 260px;
height: 260px;
border-radius: 50%;
filter: blur(60px);
opacity: 0.6;
will-change: transform;
}
.nuda-glassh__blob--a {
background: var(--glassh-accent);
top: -60px;
left: -40px;
animation: nuda-glassh-a 8s ease-in-out infinite;
}
.nuda-glassh__blob--b {
background: #8b5cf6;
bottom: -60px;
right: -40px;
animation: nuda-glassh-b 10s ease-in-out infinite;
}
.nuda-glassh__panel {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
text-align: center;
padding: 32px 40px;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.14);
border-radius: 18px;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.5);
}
.nuda-glassh__panel h2 {
font: 800 clamp(2rem, 5vw, 3.25rem) ui-sans-serif, system-ui, sans-serif;
color: #fafafa;
margin: 0;
letter-spacing: -0.02em;
}
.nuda-glassh__panel p {
font: 500 1rem ui-sans-serif, system-ui, sans-serif;
color: #cfcfd6;
margin: 0;
}
.nuda-glassh__btn {
margin-top: 8px;
padding: 10px 24px;
background: var(--glassh-accent);
color: #09090b;
border: none;
border-radius: 8px;
font: 700 0.95rem ui-sans-serif, system-ui, sans-serif;
cursor: pointer;
}
@keyframes nuda-glassh-a {
0%, 100% { transform: translate(0, 0); }
50% { transform: translate(40px, 30px); }
}
@keyframes nuda-glassh-b {
0%, 100% { transform: translate(0, 0); }
50% { transform: translate(-30px, -24px); }
}
@media (prefers-reduced-motion: reduce) {
.nuda-glassh__blob { animation: none; }
}How to use Glass 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.