Skip to content

CRT Grain Combo

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

Noise & GrainHTMLCSSany framework
REC ●

Copy into your project

HTML
<!-- CRT Grain Combo — scanlines + film grain layered -->
<div class="nuda-ng2-crt-combo">
  <div class="nuda-ng2-crt-combo__scan" aria-hidden="true"></div>
  <div class="nuda-ng2-crt-combo__grain" aria-hidden="true"></div>
  <span class="nuda-ng2-crt-combo__label">REC ●</span>
</div>
CSS
.nuda-ng2-crt-combo {
  position: relative;
  width: 100%;
  max-width: 220px;
  height: 130px;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%,#151518,#09090b 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  box-shadow: inset 0 0 30px rgba(0,0,0,.6);
}

.nuda-ng2-crt-combo__scan {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg,rgba(228,255,84,.07) 0,rgba(228,255,84,.07) 1px,transparent 1px,transparent 4px);
  pointer-events: none;
  animation: _nuda-ng2crtcombo-roll 6s linear infinite;
}

.nuda-ng2-crt-combo__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: 130px 130px;
  opacity: .14;
  mix-blend-mode: overlay;
  pointer-events: none;
  animation: _nuda-ng2crtcombo-grain .6s steps(5) infinite;
}

.nuda-ng2-crt-combo__label {
  position: relative;
  z-index: 1;
  font-family: ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #e4ff54;
  animation: _nuda-ng2crtcombo-blink 2.4s steps(2) infinite;
}

@keyframes _nuda-ng2crtcombo-roll {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 40px;
  }
}

@keyframes _nuda-ng2crtcombo-grain {
  0% {
    transform: translate3d(0,0,0);
  }
  25% {
    transform: translate3d(-8px,5px,0);
  }
  50% {
    transform: translate3d(6px,-7px,0);
  }
  75% {
    transform: translate3d(-5px,-3px,0);
  }
  100% {
    transform: translate3d(0,0,0);
  }
}

@keyframes _nuda-ng2crtcombo-blink {
  0%,60% {
    opacity: 1;
  }
  80%,100% {
    opacity: .35;
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-ng2-crt-combo__scan,.nuda-ng2-crt-combo__grain,.nuda-ng2-crt-combo__label {
    animation: none;
  }
  .nuda-ng2-crt-combo__label {
    opacity: 1;
  }
}

How to use CRT Grain Combo

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