Pass the value and the format.
plan-price.tsx
RollingNumber
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | bigint | — | The number to show. A bigint keeps every digit of a value past 2^53. |
| locale | string | — | 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. |
| format | NumberFormatOptions | — | 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. |



