ZeroGravity UI

Pointerstable

GridTrail

A pointer trail that lights cells on an invisible grid, then stops the loop.

Customize

Cellssize, shape and fade
preset
color
56 pxcellSize
2 pxgap
0 pxcornerRadius
shape
0.50peakOpacity
450 msfadeDuration
90maxCells
0.00neighborFalloff
Static gridlines drawn on the same canvas
showGrid
gridColor
0.060gridOpacity
blendMode
scoped

Usage

TSX
import { GridTrail } from "zerogravity"

<GridTrail />

Generated from the controls above. Only props that differ from their defaults are shown.

Props

16 documented props on GridTrail
PropertyTypeDefaultDescription
preset"amber" | "cyan" | "violet" | "emerald" | "rose" | "mono""amber"Preset palette.
colorstring | nullnullOverride colour.
cellSizenumber56Cell size. Range 16 to 160 px.
gapnumber2Gap. Range 0 to 24 px.
cornerRadiusnumber0Corner radius. Range 0 to 40 px.
shape"square" | "circle""square"Shape.
peakOpacitynumber0.5Peak opacity. Range 0.05 to 1.
fadeDurationnumber450Fade duration. Range 80 to 2500 ms.
maxCellsnumber90Max cells. Range 5 to 400.
neighborFalloffnumber0Neighbour falloff. Range 0 to 1.
showGridbooleanfalseShow grid lines.
gridColorstring | nullnullOverride grid colour.
gridOpacitynumber0.06Grid opacity. Range 0 to 0.4.
blendMode"source-over" | "lighter" | "screen" | "overlay""source-over"Blend mode.
containerRefObject<HTMLElement>—Scope the trail to one element instead of the viewport.
zIndexnumber0Stacking level of the trail canvas.

Dependencies

0 external runtime dependencies

Ships with nothing but React.