Skip to content

Rolling Number

Free

Shows a number that changes in front of people, such as a live count or a price. Each digit rolls to its new value, so people see what changed.

  • Base UI
  • Motion
  • React 19
  • Tailwind CSS 4

Added Nov 8, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Pass the value and the format.

plan-price.tsx

RollingNumber

<span>
PropTypeDefaultDescription
valueRequirednumber | bigint—The number to show. A bigint keeps every digit of a value past 2^53.
localestring—The BCP 47 locale of the digits and marks ("de-DE"). Default: the DisplayLocaleProvider locale, else "en-US" (useDisplayLocale). Never the browser language, so a server render and the first browser render write the same number.
formatNumberFormatOptions—The options of Intl.NumberFormat: style (currency, percent, unit), notation (compact), the fraction digits, signDisplay, numberingSystem, and the others. Its parts (formatToParts) decide the columns: each digit rolls, each other part fades.
trend"auto""down""shortest""up""auto"The direction of each roll. auto (the default) takes it from the value: a bigger value rolls up (the new digit comes in from below), a smaller one rolls down. shortest turns each column the short way round on its own (a clock or a slot machine look).
snap"always""fast""never""never"When a change shows the new digits at once, with no roll and no fade. never (the default) rolls each change. fast jumps while the value changes fast (a new value less than one roll after the last, as a pointer that scrubs a chart sends), and rolls again on the first change after a pause. always never rolls.
...props<span> attributes—Every other attribute goes to the <span>, with a ref.
  • Use it for prices, counts, and scores.
  • Use format for currency, percent, or compact text.
  • Use trend to pick the direction.
  • Use snap="fast" for a readout that follows a pointer, such as a chart tooltip.

The number is real page text: a copy, the page HTML, and an agent read the formatted value, such as "$79".

  1. AddedRolling Number.
Open the release