crucıble

Drawbench

A pinned how-it-works section: scroll advances a step list while a beam draws down its rail and each step's illustration assembles on a blueprint stage — dashed wireframe boxes resolving into a filled UI vignette (form, chart, toggles, team). Steps double as a keyboard tablist that jumps the scroll.

motionpro

Installation

CLI

npx shadcn@latest add @crucible/drawbench

Manual — install dependencies, then copy the source

npm install motion

Props

PropTypeDefaultDescription
titleReact.ReactNodeSection heading (h2) pinned above the steps.
stepsDrawbenchStep[]a four-step setup flowThe process, 3–5 steps reads best.
pinLengthnumber0.7 × steps.lengthPinned scroll distance, in multiples of the scroller's viewport height. Larger = more scrolling per step.
accentColorstring"#8b9dff"Single accent hue for the beam, step markers and vignette highlights.
scrollerReact.RefObject<HTMLElement | null>the windowScroll container to pin inside instead of the window. Pass a ref to an overflow-y-auto ancestor (e.g. a boxed preview).
refReact.Ref<DrawbenchHandle>Imperative handle — goTo(index).
Also accepts all props of Omit<React.ComponentPropsWithoutRef<"section">, "children" | "title"> — they pass through to the underlying element.

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