Animated Grid Pattern
interlace-ui/animated-grid-patternFreeComponent
A tiled SVG grid where a handful of cells softly pulse in and out, then teleport to a new random cell on each cycle — a "breathing" graph-paper backdrop for heroes and section bands. Re-authored from the MagicUI pattern to the Interlace component floor.
Install it
npx shadcn@latest add https://ds.interlace.tools/r/animated-grid-pattern.jsonSource
1"use client";23import {4 forwardRef,5 useCallback,6 useEffect,7 useId,8 useMemo,9 useRef,10 useState,11 type ComponentPropsWithoutRef,12} from "react";1314// @interlace/animated-grid-pattern v1.1.0 — Interlace design system.15// Docs, props and live preview: https://ds.interlace.tools/c/animated-grid-pattern16// What changed since: https://ds.interlace.tools/c/animated-grid-pattern#history17// Generated banner — keep it, the upgrade diff reads this version.1819/**20 * @interlace/ui — AnimatedGridPattern (decorative background primitive)21 *22 * A tiled SVG grid where a handful of cells softly pulse in and out, then23 * teleport to a new random cell on each cycle — a "breathing" graph-paper24 * backdrop for heroes and section bands. Re-authored from the MagicUI25 * pattern to the Interlace component floor.26 *27 * | Rule | Concept | Where in this file |28 * | ---- | -------------------------------- | ---------------------------------------------------------------------------------- |29 * | R4 | Extends native el + JSDoc | `ComponentPropsWithoutRef<"svg">`; every public prop documented with `@default` |30 * | R5 | `data-testid` typed, no default | `"data-testid"?: string` — consumer supplies the selector |31 * | R6 | `data-slot` on the root | `data-slot="animated-grid-pattern"` on the `<svg>` |32 * | R7 | className merged + ...rest + ref | `cn(...)`, `{...props}`, `ref` forwarded to the root `<svg>` |33 * | R8 | Booleans no `isXxx` | No boolean props; numeric/string knobs only |34 * | R18 | Tailwind only | No inline `style`; geometry is SVG attributes, color is a Tailwind class |35 * | R19 | Tokens only — no raw color | Color via `currentColor` (default class `text-muted-foreground/20`); no hex |36 * | R23 | CLS=0 | `absolute inset-0 pointer-events-none` decorative chrome — reserves no flow space |37 * | R25 | Perf — `'use client'` justified | Reads `ResizeObserver` + `useReducedMotion`; gated to interactive use only |38 * | R26 | A11y | `aria-hidden` — purely decorative, never announced; zero axe suppressions |39 *40 * ## API parity41 *42// … truncated
More from interlace-ui
All 140 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| A11y Startera11y-starter | interlace-ui | Components | Free | no deps | |
| Accordionaccordion | interlace-ui | Components | Free | no deps | |
| Alertalert | interlace-ui | Components | Free | no deps | |
| Alert Dialogalert-dialog | interlace-ui | Components | Free | no deps | |
| Animated Gradient Textanimated-gradient-text | interlace-ui | Components | Free | no deps | |
| Animated Listanimated-list | interlace-ui | Components | Free | no deps | |
| Article Cardarticle-card | interlace-ui | Components | Free | no deps | |
| Article List Gridarticle-list-grid | interlace-ui | Components | Free | no deps |
