"use client"; import type { ReactNode } from "react"; import { motion, useReducedMotion } from "motion/react"; type NebulaGridProps = { children?: ReactNode; className?: string; /** Colour of the grid lines and the horizon line. */ color?: string; /** Colour of the glow on the horizon. */ glow?: string; background?: string; /** Grid cell size in pixels. */ cell?: number; /** 1 is the default pace; 2 is twice as fast. */ speed?: number; }; /* NebulaGrid: a glowing grid floor that rolls toward you, with a soft glow on the horizon. */ export function NebulaGrid({ children, className = "", color = "#a78bfa", glow = "#ff5fa2", background = "#07060f", cell = 44, speed = 1, }: NebulaGridProps) { const reduce = useReducedMotion(); const lines = `linear-gradient(${color} 1px, transparent 1px), linear-gradient(90deg, ${color} 1px, transparent 1px)`; const fade = "linear-gradient(to bottom, transparent, black 45%)"; return (
{children}
); }