crucıble

Cipher

Characters churn through scrambled forge-rune glyphs before quenching into the final text, one at a time. Triggerable on mount, hover, or scroll into view; resolves instantly under reduced motion.

cssfree

Installation

CLI

npx shadcn@latest add @crucible/cipher

Props

PropTypeDefaultDescription
childrenstringThe text to resolve into.
trigger"mount" | "hover" | "view""mount"What starts the scramble.
resolveOrder"start" | "end" | "center" | "random""random"Order characters lock into place.
charsetstringabstract glyph setGlyphs drawn from while a character is still scrambling.
durationnumber1.1Seconds for the whole string to resolve.
delaynumber0Seconds to wait before the scramble starts.
repeatbooleanfalseRe-run every time the trigger fires again (hover/view only).
scrambleColorstringneutral-400Color of the still-scrambling glyphs.
flashColorstringwhiteColor of the brief flash when a character locks in.
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.