Skip to content

Grain Vignette

A copy-paste noise & grain component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

Noise & GrainHTMLCSSany framework
Vignette

Copy into your project

HTML
<!-- Grain Vignette — grain plus a slow breathing vignette -->
<div class="nuda-grain-vignette">
  <span class="nuda-grain-vignette__label">Vignette</span>
  <div class="nuda-grain-vignette__grain" aria-hidden="true"></div>
  <div class="nuda-grain-vignette__ring" aria-hidden="true"></div>
</div>
CSS
.nuda-grain-vignette {
  position: relative;
  width: 100%;
  max-width: 220px;
  height: 130px;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(ellipse at center,#1c1c22,#09090b);
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.nuda-grain-vignette__label {
  position: relative;
  z-index: 1;
  font-family: ui-sans-serif,system-ui,sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #e4ff54;
}

.nuda-grain-vignette__grain {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 150px 150px;
  opacity: .18;
  mix-blend-mode: overlay;
  pointer-events: none;
  animation: _vignetteGrain .5s steps(5) infinite;
}

.nuda-grain-vignette__ring {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 70% at 50% 50%,transparent 40%,rgba(9,9,11,.85) 100%);
  pointer-events: none;
  animation: _vignetteBreathe 6s ease-in-out infinite;
}

@keyframes _vignetteGrain {
  0% {
    transform: translate3d(0,0,0);
  }
  25% {
    transform: translate3d(-10px,6px,0);
  }
  50% {
    transform: translate3d(8px,-8px,0);
  }
  75% {
    transform: translate3d(-6px,-4px,0);
  }
  100% {
    transform: translate3d(0,0,0);
  }
}

@keyframes _vignetteBreathe {
  0%,100% {
    opacity: .7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-grain-vignette__grain,.nuda-grain-vignette__ring {
    animation: none;
  }
}

How to use Grain Vignette

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.

More noise & grain components

← Browse all NudaUI components