184 Components

Moving Grid Lines

Backgrounds

Architectural grid matrix surface featuring randomized kinetic light beams gliding along orthogonal horizontal and vertical tracks.

Installation

Install directly into your project using the shadcn CLI or copy the source code manually.

Requires:clsxtailwind-merge
$npx shadcn@latest add "https://boseui.site/r/moving-grid-lines.json"

Props

TypeScript props supported by <MovingGridLines />.

7 props
PropTypeDefaultDescription
gridSizenumber64Size of each square grid cell in pixels.
beamCountnumber8Number of concurrent moving light beams.
beamLengthnumber160Length of the glowing beam trail in pixels.
speednumber1.5Speed multiplier for traveling beams.
radialMaskbooleantrueWhether to apply a radial vignette mask fading edges to transparency.
gridColorstringundefinedExplicit grid line color. Defaults to adaptive theme color.
beamColorstringundefinedExplicit beam glow color. Defaults to adaptive theme color.

Key Features

  • GPU-composited canvas grid matrix with zero DOM overhead and continuous 60fps frame rate.
  • Orthogonal beam physics: light pulses travel along precise grid tracks with glowing gradient tails and head sparks.
  • Adaptive color rendering responding dynamically to light and dark mode changes.
  • Respects prefers-reduced-motion by pausing moving beams while retaining the architectural grid.

Keyboard & Accessibility

  • Underlying canvas is marked aria-hidden='true' to prevent interference with screen readers.
  • Motion automatically disables when prefers-reduced-motion is active.
  • Designed with high contrast compatibility for text and foreground elements.