crucıble

Latticework

An interactive dot grid: cool-steel silver dots heat white → cyan as the cursor approaches, with a configurable falloff curve. Freezes to a static, gently lit frame under prefers-reduced-motion.

canvasfree

Installation

CLI

npx shadcn@latest add @crucible/latticework

Props

PropTypeDefaultDescription
spacingnumber34Spacing between dots in px.
dotRadiusnumber1.4Resting dot radius in px.
radiusnumber180Proximity radius in px within which dots warm up.
falloffLatticeworkFalloff"gaussian"Shape of the heat falloff curve across the proximity radius.
colors[string, string, string]steel silver → white → cyanCold → mid → hot color ramp.
responsivenessnumber0.12How quickly dots ease toward their target heat, 0–1 per frame at 60fps.
dprnumber2devicePixelRatio ceiling.
strikeStrengthnumber1Pointer-down "hammer-strike" strength: an expanding ring of displacement and temporary heat radiates from the strike point. 0 disables strikes. On coarse pointers a tap lands one strike.
pausedbooleanFreeze the field — pointer tracking stops and the current frame holds.
Also accepts all props of React.ComponentPropsWithoutRef<"div">they pass through to the underlying element.

Honors prefers-reduced-motion with a designed static fallback, pauses offscreen and on hidden tabs, and passes className through.