number-flow
An animated number component for React, Vue, Svelte, and TS/JS.
A JavaScript component that animates number changes with an odometer-style rolling effect, working in React, Vue, Svelte, and plain JavaScript with built-in accessibility support for reduced motion and screen readers.
NumberFlow is a JavaScript component that animates number changes on a web page. Rather than updating a displayed figure instantly, the component transitions between values in a way that makes individual digits appear to count up or down, producing a visual effect similar to an odometer rolling forward or a physical flip-board counter. This kind of animation is often used on scoreboards, dashboards, pricing displays, and statistics counters where the change itself draws the reader's attention.
The component is designed to work inside four different JavaScript environments: React, Vue, and Svelte, which are popular frontend frameworks, as well as plain TypeScript or JavaScript for projects that do not use a framework at all. It is published on npm under the name number-flow, and the package version is tracked via a badge in the README.
The project's topic tags include "accessible," which indicates the component accounts for users who have set reduced motion preferences on their device or who rely on screen readers. Animations that play without considering those scenarios can cause problems for some users, and the tag suggests those cases were addressed during development.
The GitHub README is intentionally brief and points to an external documentation site at number-flow.barvian.me for full usage instructions, API options, and examples. No installation steps or code samples appear in the README itself. The author also links to a companion project called TextMorph, which applies a similar animated transition effect to text content rather than numbers, developed by a separate contributor.
Where it fits
- Add animated number transitions to a dashboard so statistics visually count up or down when values update
- Build a pricing display where switching plans shows numbers rolling smoothly to new amounts
- Create a live scoreboard where score changes trigger an odometer-style counting animation