crucıble

Recast

A word that re-forms into a new one: shared letters slide along the baseline to their new home while unique letters iris in and out, then tighten a hair into their final kerning. Real selectable text, announced politely on change; swaps instantly under reduced motion.

motionfree

Installation

CLI

npx shadcn@latest add @crucible/recast

Manual — install dependencies, then copy the source

npm install motion

Props

PropTypeDefaultDescription
childrenstringThe text to display. Whenever it changes, the word re-forms: shared letters slide to their new home while unique letters iris in/out.
wordsstring[]Optional words to auto-cycle through. When provided, the component morphs between them on a timer (pausing offscreen and on hidden tabs) and children is ignored.
intervalnumber2600Milliseconds each cycled word holds before re-forming into the next.
loopbooleantrueRestart from the first word after the last (cycle mode).
pausedbooleanfalseFreeze cycling on the current word.
durationnumber0.6Seconds the position morph / iris takes.
staggernumber0.016Seconds between each entering/leaving letter's start.
onIndexChange(index: number) => voidFired whenever a new word becomes current (cycle mode).
Also accepts all props of Omit<React.ComponentPropsWithoutRef<"span">, "children">they pass through to the underlying element.

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