// GridOverlay — subtle dot or line grid pattern, faded with a radial // mask so it brightest at the centre and disappears toward the // edges. The classic "engineering blueprint" tech vibe without // fighting the foreground content. // // Stacks on top of MeshBackdrop, beneath foreground content. Pointer- // events off; aria-hidden. import type { ReactNode } from 'react' import { cn } from '../cn' interface GridOverlayProps { readonly className?: string /** Grid style — dotted (default, gentler) or lined (stronger * blueprint feel). */ readonly variant?: 'dots' | 'lines' /** Cell size in px. Default 32. */ readonly size?: number } export const GridOverlay = ({ className, variant = 'dots', size = 32, }: GridOverlayProps): ReactNode => { // For dots: a single radial gradient repeating in a tiny tile. // For lines: two linear gradients (h + v) over the same tile. const dotsBg = `radial-gradient(circle, var(--foreground) 1px, transparent 1.5px)` const linesBg = `linear-gradient(to right, var(--foreground) 1px, transparent 1px),` + `linear-gradient(to bottom, var(--foreground) 1px, transparent 1px)` return (
) }