All components

Iso Momentum

Illustrations

An isometric slab field where every slab's height tracks pointer proximity and springs independently. The pointer flows through a motion value into each slab's path `d` string at 60fps — no React state, no re-renders while it moves. Pointer events, so it works under touch and pen, not just a mouse.

Move across the field — or drag, on touch. React never re-renders while it moves.

Falloff
Damping · 18
Slabs · 15

Damping under ~10 overshoots and wobbles; over ~30 it goes syrupy. The default is 18 — the difference between those numbers is the entire feel of the component.

Installation

Terminal
npx shadcn@latest add https://ui.saumyarex.xyz/r/iso-momentum.json

Props

PropTypeDefaultDescription
barsnumber15Number of slabs. The layout and viewBox height are derived from this, so the field always fills its box.
maxHeightnumber56Peak height of a slab directly under the pointer, in viewBox units.
falloff(distance: number) => numberDistance in viewBox units → intensity in 0…1. Height is `lerp(restingHeight, maxHeight, falloff(distance))`. Defaults to a two-stage ramp: a tight near lobe plus a long shallow tail.
restingHeightsnumber[]Per-slab heights when no pointer is present. Defaults to a generated ramp silhouette.
springSpringOptions{ stiffness: 140, damping: 18, mass: 1 }Applied to each slab independently. The stagger you see is emergent, not scripted — each slab springs from its own starting height.
colorstring"currentColor"Fill for every face, at three opacities. Inherits the text color by default, so it adapts to both themes for free.
labelstringAccessible name. Omit and the field is `aria-hidden` — it is decorative and has no state to act on.

Dependencies

motionclsxtailwind-merge