Skip to content

    Browse components

    Grid Background

    A fine grid where random cells softly light up and fade out, framed by a radial fade. Canvas 2D.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/grid-background

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/grid-background.json

    Usage

    import { GridBackground } from "@/components/ui/grid-background";
    
    <div className="relative h-96">
      <GridBackground color="#c6ff3d" />
    </div>

    Props

    PropTypeDefaultDescription
    cellSizenumber36Px per cell.
    colorstring"#c6ff3d"Glow color of lit cells.
    lineColorstring"#52525b"Grid line color.
    densitynumber0.05Fraction of cells lit at any moment.
    speednumber1Fade speed multiplier.
    fadenumber0.75Size of the visible area before the radial fade.
    classNamestring—Extra classes for the root element.