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

Command Palette

Search for a command to run...

Docs
Interactive Grid Pattern

Interactive Grid Pattern

A interactive background grid pattern made with SVGs, fully customizable using Tailwind CSS.

Installation

Examples

Colorful

Usage

import { InteractiveGridPattern } from "@/components/magicui/interactive-grid-pattern";
<div className="relative h-[500px] w-full overflow-hidden">
  <InteractiveGridPattern />
</div>

Props

PropTypeDescriptionDefault
widthnumberWidth of each square in the grid40
heightnumberHeight of each square in the grid40
squares[number, number]Number of squares in the grid. First number is horizontal squares, second is vertical squares[24,24]
classNamestringClass name applied to the grid container-
squaresClassNamestringClass name applied to individual squares in the grid-