Ali Imam

Pixel Grid

Backgrounds 164

About

Pixel Grid with props

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

Code

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

Usage.tsx

"use client";

import { PixelGrid } from "@/components/ui/pixel-grid";

const settings = {
  pixelSize: 3,
  pixelSpacing: 3,
  pixelColor: "#0000ff",
  pixelMaxLife: 500,
  glow: false,
  pixelBornFade: 50,
};

export default function Demo(props: Partial<typeof settings>) {
  const s = { ...settings, ...props };
  return (
    <div className="h-screen w-screen">
      <PixelGrid
        pixelSize={s.pixelSize}
        pixelSpacing={s.pixelSpacing}
        pixelColor={s.pixelColor}
        pixelMaxLife={s.pixelMaxLife}
        glow={s.glow}
        pixelBornFade={s.pixelBornFade}
      />
    </div>
  );
}