FX · Backgrounds

A perspective grid gliding toward the viewer and fading at the horizon.

Enter the grid

Terminal
npx shadcn@latest add https://www.rad-ui.com/r/grid-backdrop.json
React
import GridBackdrop from "@/components/fx/grid-backdrop" <GridBackdrop className="px-8 py-28"><h2>Enter the grid</h2></GridBackdrop>
  • The grid is aria-hidden and ignores pointer events.
  • Pauses offscreen; `paused` stops it on demand.
  • prefers-reduced-motion: reduce (or data-rad-fx-motion="reduce" on an ancestor) holds the grid still.
PropTypeDefaultDescription
color
stringviolet, 45%

Line colour.

glowColor
stringviolet, 35%

Glow along the horizon.

cellSize
number28

Cell size in px (before perspective).

speed
number1.2

Seconds to travel one cell.

paused
booleanfalse

Stop the animation. It also pauses itself offscreen.

...props
ComponentProps<'div'>—

Passed to the root div; children render above the effect.