Examples
Default
Roll At Rest
Comparison
Digit Count Change
Props
AnimatedNumber
Animates a number when its value changes, either by rolling each digit like an odometer or by counting through the intermediate values. Both variants collapse to an instant swap underprefers-reduced-motion: reduce.
The rolling variant stacks all ten digits in each column, so the visual is hidden from assistive technology and the formatted value is exposed once as text instead.
Turns the value into the displayed string. Receives interpolated values in the
count variant, so it must handle non-integers.Exported types
Also exported from@fanvue/ui: AnimatedNumberProps, AnimatedNumberVariant.
Setup: Installation · Theming