A high-performance, interactive background grid for React. Tracks cursor movement to create a customizable glowing trail effect using pure DOM elements and CSS Grid. Fully responsive with configurable cell sizes, colors, and fade durations.
"use client"; import TrailGrid from "@/components/ui/trail-grid"; const settings = { cellSize: 40, duration: 150, cellColor: "#e5e5e5", bgColor: "#111111", }; export default function Demo(props: Partial<typeof settings>) { const s = { ...settings, ...props }; return ( <div className="h-screen w-screen"> <TrailGrid cellSize={s.cellSize} duration={s.duration} cellColor={s.cellColor} bgColor={s.bgColor} /> </div> ); }