ui-kit0.0

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.50

Waiting 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.

Teams onboarded
Uptime, last 12 months
Requests per day

API

AnimatedNumber

PropTypeDefaultDescription
valuenumber—The number to show.
formatIntl.NumberFormatOptions—Currency, percent, compact, signDisplay…
localestring'en-US'Fixed by default so server and client render the same.
prefix / suffixstring—Static text around the number.
animateOnViewbooleanfalseStart at 0 and roll up when first visible.

useCountUp({ … }) → { ref, value, inView }

PropTypeDefaultDescription
end / startnumber— / 0Where to count to and from.
duration / delaynumber1400 / 0In milliseconds.
thresholdnumber0.4Visible fraction that starts the count.
oncebooleantrueCount only the first time it is seen.
disabledboolean—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.