Pointerstable
GridTrail
A pointer trail that lights cells on an invisible grid, then stops the loop.
Customize
Cellssize, shape and fade
presetcolor56 px
cellSize2 px
gap0 px
cornerRadiusshape0.50
peakOpacity450 ms
fadeDuration90
maxCells0.00
neighborFalloffStatic gridlines drawn on the same canvas
showGridgridColor0.060
gridOpacityblendModescopedUsage
import { GridTrail } from "zerogravity"
<GridTrail />Generated from the controls above. Only props that differ from their defaults are shown.
Props
| Property | Type | Default | Description |
|---|---|---|---|
preset | "amber" | "cyan" | "violet" | "emerald" | "rose" | "mono" | "amber" | Preset palette. |
color | string | null | null | Override colour. |
cellSize | number | 56 | Cell size. Range 16 to 160 px. |
gap | number | 2 | Gap. Range 0 to 24 px. |
cornerRadius | number | 0 | Corner radius. Range 0 to 40 px. |
shape | "square" | "circle" | "square" | Shape. |
peakOpacity | number | 0.5 | Peak opacity. Range 0.05 to 1. |
fadeDuration | number | 450 | Fade duration. Range 80 to 2500 ms. |
maxCells | number | 90 | Max cells. Range 5 to 400. |
neighborFalloff | number | 0 | Neighbour falloff. Range 0 to 1. |
showGrid | boolean | false | Show grid lines. |
gridColor | string | null | null | Override grid colour. |
gridOpacity | number | 0.06 | Grid opacity. Range 0 to 0.4. |
blendMode | "source-over" | "lighter" | "screen" | "overlay" | "source-over" | Blend mode. |
container | RefObject<HTMLElement> | — | Scope the trail to one element instead of the viewport. |
zIndex | number | 0 | Stacking level of the trail canvas. |
Dependencies
0 external runtime dependencies
Ships with nothing but React.