crucıble

Contour

Living topographic map: marching-squares contour lines over an evolving 3D value-noise terrain, thin minor strokes with a bold accent index line every fifth level, over soft posterized elevation bands. Cool cartographic default. Canvas 2D, seeded, offscreen-paused, DPR-clamped, reduced-motion-safe.

canvasfree

Installation

CLI

npx shadcn@latest add @crucible/contour

Props

PropTypeDefaultDescription
colors[string, string]["#64788f", "#dbe9fb"]Two tones [line, accent]. line colors the thin minor contour lines; accent colors the bolder index line (every fifth contour) and tints the soft elevation bands toward the peaks. Defaults to a cool cartographic slate-on-ice. Pass warm tones for a topographic-heat look.
speednumber1Morph-speed multiplier — how fast the terrain evolves. 1 = default.
intensitynumber1Line brightness / opacity, 0–2.
lineGapnumber28Spacing between contour lines in CSS px — the elevation interval. Smaller = denser lines (steep terrain read), larger = sparse. Clamped 12–80.
dprnumber2devicePixelRatio ceiling. Clamped 1–2.
pausedbooleanfalseFreeze the map at a static, fully-drawn topographic frame.
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.