Data
Animated counter
Numbers that roll to their new value.
Live revenue
Each digit is a column that rolls to its new value on the morph spring. Width stays steady and the currency symbol and separators never move.
Revenue todayLive
$128,430.50Waiting for the next order…
When to use
- A number that changes while the user watches: revenue, active users, a balance.
- A figure that should count up once on entry: use
useCountUp.
Not for tables of numbers that change on every sort or filter, where the motion would be noise.
Formats and locales
Formatting is Intl.NumberFormat, so currency, percent, compact, signed and any locale work. Digits are matched by place value: 999 becoming 1,000 rolls the existing digits and lets the new ones rise in.
Currency$1,234.50
Euro, German locale1.234,50 €
Compact1.2K
Percent23.5%
With a suffix1,235 users
Signed-3,766
Count up on view
useCountUp returns a float that tweens from zero when the element first scrolls into view. Format it yourself. For rolling digits that start at zero, use animateOnView on AnimatedNumber.
0
Teams onboarded
0.0%
Uptime, last 12 months
0
Requests per day
API
AnimatedNumber
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | — | The number to show. |
| format | Intl.NumberFormatOptions | — | Currency, percent, compact, signDisplay… |
| locale | string | 'en-US' | Fixed by default so server and client render the same. |
| prefix / suffix | string | — | Static text around the number. |
| animateOnView | boolean | false | Start at 0 and roll up when first visible. |
useCountUp({ … }) → { ref, value, inView }
| Prop | Type | Default | Description |
|---|---|---|---|
| end / start | number | — / 0 | Where to count to and from. |
| duration / delay | number | 1400 / 0 | In milliseconds. |
| threshold | number | 0.4 | Visible fraction that starts the count. |
| once | boolean | true | Count only the first time it is seen. |
| disabled | boolean | — | Return end immediately. |
Accessibility
- Screen readers read one plain text node (“$128,430.50”); the rolling cells are aria-hidden.
- It is not a live region by default. For a number people should hear updated, pass
aria-live="polite"and keep the update rate low.
Motion
- Digits translate on the morph spring (~550ms). New characters rise in over 220ms with a light blur.
- Reduced motion: digits change instantly and useCountUp jumps to its end value.