Skip to content

Scanlines

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

BackgroundsHTMLCSSany framework

Copy into your project

HTML
<div class="nuda-scanlines">
  <span class="nuda-scanlines__sweep"></span>
</div>
CSS
.nuda-scanlines {
  position: relative;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(228, 255, 84, 0.04) 0,
      rgba(228, 255, 84, 0.04) 1px,
      transparent 1px,
      transparent 4px
    ),
    linear-gradient(135deg, #09090b, #1a1a20);
}

.nuda-scanlines__sweep {
  position: absolute;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(180deg, transparent, rgba(228, 255, 84, 0.16), transparent);
  animation: nuda-scan-sweep 4s linear infinite;
}

@keyframes nuda-scan-sweep {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(120px); }
}

How to use Scanlines

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 backgrounds components

← Browse all NudaUI components