Grid patternPro
A technical grid background where a few cells gently light up.
$
pnpm dlx shadcn@latest add @lode/grid-patternLive preview
// Built on a grid
Precise by default
When to use
- Section and hero backgrounds with a technical, precise feel.
When not to use
- Behind busy imagery.
Installation
$
pnpm dlx shadcn@latest add @lode/grid-patternPro components need an API key and the registry in components.json. See CLI and API keys.
1Install the dependencies
npm install motion2Copy the source into your project
Usage
Import it from @/components/ui/grid-pattern after installing.
example.tsx
import { GridPattern } from "@/components/ui/grid-pattern";
<section className="relative overflow-hidden">
<GridPattern size={40} flicker={10} />
<h2 className="relative">Precise by default</h2>
</section>API reference
GridPattern
An SVG grid that fills its parent, with a few softly glowing cells.
size= 40
number
Cell size in px.
flicker= 10
number
Glowing cells.
fade= "radial"
"radial" | "bottom" | "none"
Edge fade.
color= var(--brand)
string
Glow color.
| Prop | Type | Default | Description |
|---|---|---|---|
| size | number | 40 | Cell size in px. |
| flicker | number | 10 | Glowing cells. |
| fade | "radial" | "bottom" | "none" | "radial" | Edge fade. |
| color | string | var(--brand) | Glow color. |
Accessibility
- Decorative and aria-hidden; no glow under reduced motion.
Motion
- Cells fade in and out on staggered timers.
Responsive behavior
- Fills any size; the grid stays crisp.
Performance
- A single SVG pattern plus a handful of animated rects.
Notes for AI
- Uses var(--grid-line) for lines when your theme defines it.
This page as Markdown, for assistants and coding agents:
/components/grid-pattern/markdownThe full library index for assistants is at /llms.txt.
Related
ParticlesProComponentA drifting constellation of dots on canvas that moves away from the pointer.Hero sectionProBlockLaunch hero with badge, flowing gradient headline, two actions and a live product preview on a glowing grid.Aurora backgroundProComponentSlow drifting northern-lights glow behind any section.
Lode·229 doc pages·llms.txt