Breathing Spotlight
A copy-paste animated gradients component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Animated GradientsHTMLCSSany framework
Copy into your project
HTML
<!-- Breathing Spotlight -->
<div class="nuda-ga2-breathing-spotlight" role="img" aria-label="Slowly breathing radial spotlight gradient"></div>CSS
.nuda-ga2-breathing-spotlight {
position: relative;
width: 220px;
height: 140px;
border-radius: 14px;
background: #09090b;
overflow: hidden;
}
.nuda-ga2-breathing-spotlight::before {
content: "";
position: absolute;
inset: 0;
background: radial-gradient(circle at 50% 50%,rgba(228,255,84,.55),transparent 55%);
animation: _nuda-ga2breathing-spotlight-pulse 4s ease-in-out infinite;
will-change: transform,opacity;
}
@keyframes _nuda-ga2breathing-spotlight-pulse {
0%,100% {
transform: scale(.7);
opacity: .5;
}
50% {
transform: scale(1.15);
opacity: 1;
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-ga2-breathing-spotlight::before {
animation: none;
transform: scale(1);
opacity: .8;
}
}
How to use Breathing Spotlight
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.