Mathew

Trail Grid

Backgrounds 100

About

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.

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

Code

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

Usage.tsx

"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>
  );
}

More by Mathew

View all
  • Radial Time Picker

    Radial Time Picker

    84
  • Scrubbable Inputs

    Scrubbable Inputs

    1
  • "Native" Mobile Nav

    "Native" Mobile Nav

  • NexusOrb

    NexusOrb

More in Backgrounds

View all
  • Elegant Dark Pattern

    Elegant Dark Pattern

    811
  • Gradient Backgrounds

    Gradient Backgrounds

    25
  • Jade Sky

    Jade Sky

    85
  • LivingOrigami bg

    LivingOrigami bg

    135
  • Tailwind CSS Background Snippet

    Tailwind CSS Background Snippet

    536
  • Background snippets

    Background snippets

    14
  • Light theme Tailwind CSS Background Snippet

    Light theme Tailwind CSS Background Snippet

    221
  • Gradient Blur Bg

    Gradient Blur Bg

    18