crucıble

Anvil

A magnetic button with the heft of forged iron — it leans toward the cursor with damped spring lag, snaps back elastically on exit, and presses like an anvil strike: sharp compression, slow spring recovery, hairline white flash at the base edge.

motionpro

Installation

CLI

npx shadcn@latest add @crucible/anvil

Manual — install dependencies, then copy the source

npm install motion

Props

PropTypeDefaultDescription
strengthnumber0.8How hard the iron leans toward the cursor.
maxDistancenumber100Radius in px around the button's center within which the pull engages.
springAnvilSpringConfigMagnetic spring. Deliberately heavy defaults — a slab of iron, not a balloon.
flashColorstringwhiteColor of the hairline flash at the base edge on strike.
childrenReact.ReactNodeButton label / content.
Also accepts all props of Omit<HTMLMotionProps<"button">, "children">they pass through to the underlying element.

Honors prefers-reduced-motion with a designed static fallback, and passes className through.