Browse components
Grid Background
A fine grid where random cells softly light up and fade out, framed by a radial fade. Canvas 2D.
Installation
npx shadcn@latest add @glint-ui/grid-backgroundFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glint-ui-seven.vercel.app/r/grid-background.json
Usage
import { GridBackground } from "@/components/ui/grid-background";
<div className="relative h-96">
<GridBackground color="#c6ff3d" />
</div>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| cellSize | number | 36 | Px per cell. |
| color | string | "#c6ff3d" | Glow color of lit cells. |
| lineColor | string | "#52525b" | Grid line color. |
| density | number | 0.05 | Fraction of cells lit at any moment. |
| speed | number | 1 | Fade speed multiplier. |
| fade | number | 0.75 | Size of the visible area before the radial fade. |
| className | string | — | Extra classes for the root element. |