The 1.0 release
SlotEffect animates a hero number into place with a slot-machine roll: each digit spins on its own reel and settles on the final value, giving a key figure (e.g. $4.2B) a moment of mechanical theater before it comes to rest.
Highlights
- Spring-eased roll — a critically-tuned
linear()spring curve gives each reel a natural overshoot-and-settle, with per-digit stagger so they land in sequence rather than in lockstep. - Baseline-perfect rest — digits settle on the exact text baseline shared by static glyphs (
$,.,B), with no end-of-roll jump or flicker. - Accessible & motion-safe — honors
prefers-reduced-motion(snaps straight to the value), and exposes the full number viaaria-labelso assistive tech reads it instantly. - Zero dependencies — pure Web Animations API and CSS; drop it onto any element holding a numeric string.