Retro Grid
Synthwave perspective grid that scrolls toward the horizon.
Nightcall, side B
Nine tracks at 118 BPM. Out Friday on tape and everywhere else.
Installation
npx shadcn@latest add https://neonkit.heyaadi.com/r/retro-grid.jsonUsage
import { RetroGrid } from "@/components/ui/retro-grid"
<section className="relative overflow-hidden">
<RetroGrid color="magenta" />
<h1 className="relative">Hello</h1>
</section>Examples
Angle, cell size and speed
API reference
Fills its nearest positioned parent. The horizon sits halfway down.
| Prop | Type | Default |
|---|---|---|
color | NeonColorLine color. | inherited |
angle | numberFloor tilt in degrees, 20 to 88. Higher is a flatter, longer floor. | 70 |
cellSize | numberGrid square size in pixels on the floor; the row nearest the viewer draws at twice this. | 56 |
speed | numberSeconds to travel one cell. 0 stops it. | 1.2 |
opacity | numberLine opacity. | 0.55 |
horizon | booleanGlowing horizon line. | true |
Accessibility
- Decorative: rendered with aria-hidden and no pointer events. Stops moving under reduced motion.
- The horizon is computed from the angle with container query units, so it stays on the glowing line at any height. Needs container units (every browser since 2023).