Tool Open source

Rolling Number

Rolling Number is a TypeScript library for interruptible, locale-aware rolling numbers on the web, with a framework-independent DOM API and optional React and Solid adapters. It formats values with native Intl.NumberFormat, animates bounded digit reels using native browser animation playback and sampled critically damped spring easing, and samples the current position and velocity when an update interrupts an animation rather than restarting from the old target. It also provides RollingText for direct glyph transitions, alphabet-wheel animation, and split-flap displays. React and Solid adapters keep readable formatted text separate from decorative animated glyphs, while reduced-motion, unsupported formats, and offscreen states retain static text for accessibility; decorative glyphs are hidden from assistive technology. The DOM core has no runtime dependencies and the project is MIT licensed.

View repository Visit site Mentioned in 1 video ↓

What Rolling Number is used for

1 use taken from transcripts — each links to the moment in the video.

  • Animates numbers rolling or flipping to new values without restarting when the target changes during the animation. It uses CSS keyframes and spring easing and exposes plain formatted text to screen readers.

Videos mentioning Rolling Number

1 in the library.