Flickering grid
A field of small squares that flicker, drawn on a canvas.
Add it to your project
With the Magic UI commandTerminal
npx shadcn@latest add @magicui/flickering-grid
First time with Magic UI? Set it up once.
The code
"use client"
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react"
import { cn } from "@/lib/utils"
interface FlickeringGridProps extends React.HTMLAttributes<HTMLDivElement> {
squareSize?: number
gridGap?: number
flickerChance?: number
color?: string
width?: numberThis comes with paid plans
The code for every component comes with paid plans, along with the rest of the AI toolkit. The first component under each heading is free.