Holographic Foil
A copy-paste animated gradients component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Animated GradientsHTMLCSSany framework
Copy into your project
HTML
<!-- Holographic Foil -->
<div class="nuda-ga2-holo-foil" role="img" aria-label="Holographic iridescent gradient sheen"></div>CSS
.nuda-ga2-holo-foil {
position: relative;
width: 220px;
height: 140px;
border-radius: 16px;
overflow: hidden;
background: linear-gradient(120deg,#e4ff54,#22d3ee,#a855f7,#fb7185,#e4ff54);
background-size: 250% 250%;
animation: _nuda-ga2holo-foil-shift 8s ease-in-out infinite,_nuda-ga2holo-foil-hue 10s linear infinite;
}
.nuda-ga2-holo-foil::after {
content: "";
position: absolute;
inset: -50%;
background: linear-gradient(115deg,transparent 40%,rgba(255,255,255,.55) 50%,transparent 60%);
background-size: 250% 250%;
mix-blend-mode: overlay;
animation: _nuda-ga2holo-foil-sheen 3.5s linear infinite;
}
@keyframes _nuda-ga2holo-foil-shift {
0%,100% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
}
@keyframes _nuda-ga2holo-foil-hue {
to {
filter: hue-rotate(360deg);
}
}
@keyframes _nuda-ga2holo-foil-sheen {
0% {
background-position: 0% 0%;
}
100% {
background-position: 200% 200%;
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-ga2-holo-foil,.nuda-ga2-holo-foil::after {
animation: none;
}
}
How to use Holographic Foil
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.