Dillion Verma

Animated Grid Pattern

Component 433

About

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

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Animated Grid Pattern to your project and fits it to your theme.

Code

How Animated Grid Pattern is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { AnimatedGridPattern } from "@/components/ui/animated-grid-pattern";
import { cn } from "@/lib/utils";

const settings = {
  numSquares: 30,
  maxOpacity: 0.1,
  width: 40,
  repeatDelay: 1,
  strokeDasharray: 0,
};

export default function Demo(props: Partial<typeof settings>) {
  const s = { ...settings, ...props };
  return (
    <div className="relative flex h-screen w-screen items-center justify-center overflow-hidden bg-background">
      <AnimatedGridPattern
        numSquares={s.numSquares}
        maxOpacity={s.maxOpacity}
        width={s.width}
        duration={3}
        repeatDelay={s.repeatDelay}
        strokeDasharray={s.strokeDasharray}
        className={cn(
          "[mask-image:radial-gradient(500px_circle_at_center,white,transparent)]",
          "inset-x-0 inset-y-[-30%] h-[200%] skew-y-12",
        )}
      />
    </div>
  );
}

Dependencies

More by Dillion Verma

View all
  • Interactive Hover Button

    Interactive Hover Button

    3.4K
  • Rainbow Button

    Rainbow Button

    2.3K
  • Globe

    Globe

    2.2K
  • Animated Beam

    Animated Beam

    1.9K
  • Text Reveal

    Text Reveal

    1.7K
  • Sparkles Text

    Sparkles Text

    1.2K
  • Confetti

    Confetti

    1.2K
  • Interactive Icon Cloud

    Interactive Icon Cloud

    1K