{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "grid-floor",
  "type": "registry:component",
  "title": "Grid Floor",
  "description": "Synthwave perspective grid scrolling toward the viewer, with a glowing horizon fade. Pure CSS.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "overlay",
    "synthwave",
    "grid",
    "retro",
    "background",
    "3d"
  ],
  "docs": "https://hyperblur.dev/effects/grid-floor",
  "files": [
    {
      "path": "registry/hyperblur/grid-floor.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/grid-floor.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface GridFloorProps extends React.HTMLAttributes<HTMLDivElement> {\n  color?: string;\n  speed?: number;\n  cell?: number;\n  horizon?: number;\n  glow?: boolean;\n}\n\nconst css = `\n@keyframes hb-gf-scroll {\n  from { background-position: 0 0, 0 0, 0 0, 0 0; }\n  to { background-position: 0 var(--hb-cell), 0 var(--hb-cell), 0 var(--hb-cell), 0 var(--hb-cell); }\n}\n.hb-gf { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }\n.hb-gf-floor { position: absolute; left: 0; right: 0; bottom: 0; top: var(--hb-hz); overflow: hidden; perspective: 380px; perspective-origin: 50% 0; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 45%); mask-image: linear-gradient(to bottom, transparent 0, #000 45%); }\n.hb-gf-plane { position: absolute; left: -150%; right: -150%; top: 0; height: 400%; transform-origin: 50% 0; transform: rotateX(72deg); background-size: var(--hb-cell) var(--hb-cell); background-image: linear-gradient(to right, var(--hb-c) 0, var(--hb-c) 2px, transparent 2px), linear-gradient(to bottom, var(--hb-c) 0, var(--hb-c) 2px, transparent 2px); animation: hb-gf-scroll var(--hb-dur) linear infinite; }\n.hb-gf[data-glow=\"true\"] .hb-gf-plane { background-image: linear-gradient(to right, var(--hb-c) 0, var(--hb-c) 2px, transparent 2px), linear-gradient(to bottom, var(--hb-c) 0, var(--hb-c) 2px, transparent 2px), linear-gradient(to right, var(--hb-glow) 0, transparent 9px), linear-gradient(to bottom, var(--hb-glow) 0, transparent 9px); background-size: var(--hb-cell) var(--hb-cell); }\n.hb-gf-horizon { position: absolute; left: 0; right: 0; top: var(--hb-hz); height: 18%; transform: translateY(-50%); background: radial-gradient(ellipse 60% 50% at 50% 50%, var(--hb-glow), transparent 70%); opacity: 0; }\n.hb-gf[data-glow=\"true\"] .hb-gf-horizon { opacity: 1; }\n@media (prefers-reduced-motion: reduce) { .hb-gf-plane { animation: none; } }\n`;\n\nexport function GridFloor({\n  color = \"#2f7bff\",\n  speed = 1,\n  cell = 48,\n  horizon = 0.45,\n  glow = true,\n  className = \"\",\n  style,\n  ...rest\n}: GridFloorProps) {\n  const hz = Math.min(1, Math.max(0, horizon));\n  const dur = +(cell / (60 * Math.max(speed, 0.01))).toFixed(3);\n\n  const vars = {\n    \"--hb-c\": color,\n    \"--hb-glow\": `color-mix(in srgb, ${color} 35%, transparent)`,\n    \"--hb-cell\": `${cell}px`,\n    \"--hb-hz\": `${+(hz * 100).toFixed(2)}%`,\n    \"--hb-dur\": `${dur}s`,\n    ...style,\n  } as React.CSSProperties;\n\n  return (\n    <div className={`hb-gf ${className}`} style={vars} data-glow={glow} aria-hidden=\"true\" {...rest}>\n      <style href=\"hb-grid-floor\" precedence=\"default\">{css}</style>\n      <div className=\"hb-gf-floor\">\n        <div className=\"hb-gf-plane\" />\n      </div>\n      <div className=\"hb-gf-horizon\" />\n    </div>\n  );\n}\n"
    }
  ]
}