crucıble

Facet

A pointer-tracked 3D tilt card with spring-damped rotation and a hard-edged white-silver glare streak that sweeps the surface like light across brushed metal. Tilt disables on touch and under reduced motion, leaving a static subtle glare; a ghost light idles the tilt when untouched.

motionfree

Installation

CLI

npx shadcn@latest add @crucible/facet

Manual — install dependencies, then copy the source

npm install motion

Props

PropTypeDefaultDescription
childrenReact.ReactNodeContent to render on the tilting surface.
maxTiltnumber14Maximum rotation, in degrees, on either axis at the card's edge.
perspectivenumber900Container perspective distance in px — lower feels more extreme.
glareOpacitynumber0.7Peak opacity of the glare streak while hovered.
hoverScalenumber1.02Scale applied while hovered/tilting.
idlebooleantrueIdle autoplay: after 1.5s with no pointer on the card, a ghost light slowly rocks it through a shallow tilt with a dimmed glare, so the metal never reads as dead. A real pointer takes over instantly. Off under reduced motion; sleeps offscreen.
Also accepts all props of Omit<HTMLMotionProps<"div">, "children" | "ref"> — they pass through to the underlying element.

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