Introducing Magic UI Pro - 50+ blocks and templates to build beautiful landing pages in minutes.

Command Palette

Search for a command to run...

Docs
Grid Beams

Grid Beams

A dynamic grid background with animated light beams that create stunning visual effects with customizable rays and grid patterns.

Grid BEAMS

Installation

Usage

import { GridBeams } from "@/components/magicui/grid-beams";
<GridBeams>
  <div className="flex h-96 items-center justify-center">
    <h2 className="text-2xl font-bold text-white">Grid Beams Effect</h2>
  </div>
</GridBeams>

Props

PropTypeDefaultDescription
childrenReact.ReactNode-Content to display over the grid beams effect
gridSizenumber40Size of each grid cell in pixels
gridColorstring"rgba(200, 220, 255, 0.2)"Color of the grid lines (CSS color value)
rayCountnumber15Number of animated light rays
rayOpacitynumber0.35Opacity of the light rays (0-1)
raySpeednumber1Speed multiplier for ray animations
rayLengthstring"45vh"Length of the light rays (CSS length value)
gridFadeStartnumber30Start percentage for grid fade effect
gridFadeEndnumber90End percentage for grid fade effect
backgroundColorstring"#020412"Background color of the component
classNamestring-Additional CSS classes