collected.tools.

NumberFlow

Animated numbers for prices, counters and stats

What it is

NumberFlow is a component that animates numbers digit by digit when they change, for prices, counters or key figures. Formatting runs through Intl.NumberFormat, so currencies, percentages and locales are covered, and the timing and direction of the digits are adjustable. There are versions for React, Vue and Svelte plus a web component, all dependency-free and respecting reduced motion.

Install
npm install @number-flow/react
Why it made the cut
  • Formatting through Intl.NumberFormat
  • For React, Vue, Svelte and as a web component
  • NumberFlowGroup keeps several numbers in sync

Related entries