{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "scanlines",
  "type": "registry:component",
  "title": "Scanlines",
  "description": "CRT scanlines with a soft rolling band and optional flicker. Pure CSS overlay.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "overlay",
    "crt",
    "retro",
    "overlay",
    "tv"
  ],
  "docs": "https://hyperblur.dev/effects/scanlines",
  "files": [
    {
      "path": "registry/hyperblur/scanlines.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/scanlines.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface ScanlinesProps extends React.HTMLAttributes<HTMLDivElement> {\n  opacity?: number;\n  lineHeight?: number;\n  flicker?: boolean;\n  band?: boolean;\n}\n\nconst css = `\n@keyframes hb-sc-band { 0% { transform: translateY(-20%); } 100% { transform: translateY(520%); } }\n@keyframes hb-sc-flicker { 0%, 100% { opacity: 1; } 50% { opacity: .92; } 92% { opacity: .97; } 95% { opacity: .85; } }\n.hb-sc { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }\n.hb-sc::before { content: \"\"; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) calc(var(--hb-lh) - 1px), rgba(0,0,0,var(--hb-o)) calc(var(--hb-lh) - 1px), rgba(0,0,0,var(--hb-o)) var(--hb-lh)); }\n.hb-sc[data-band=\"true\"]::after { content: \"\"; position: absolute; left: 0; right: 0; top: 0; height: 18%; background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.06), rgba(255,255,255,0)); animation: hb-sc-band 7s linear infinite; }\n.hb-sc[data-flicker=\"true\"] { animation: hb-sc-flicker 4s steps(1) infinite; }\n@media (prefers-reduced-motion: reduce) { .hb-sc, .hb-sc::after { animation: none !important; } }\n`;\n\nexport function Scanlines({\n  opacity = 0.25,\n  lineHeight = 3,\n  flicker = true,\n  band = true,\n  className = \"\",\n  style,\n  ...rest\n}: ScanlinesProps) {\n  const vars = {\n    \"--hb-o\": opacity,\n    \"--hb-lh\": `${lineHeight}px`,\n    ...style,\n  } as React.CSSProperties;\n\n  return (\n    <div\n      className={`hb-sc ${className}`}\n      style={vars}\n      data-band={band}\n      data-flicker={flicker}\n      aria-hidden=\"true\"\n      {...rest}\n    >\n      <style href=\"hb-scanlines\" precedence=\"default\">{css}</style>\n    </div>\n  );\n}\n"
    }
  ]
}