Installation
npx shadcn@latest add @iconiq/rolling-digitsProps
RollingDigits
Inline animated counter that swaps digits with spring-driven blur, scale, and vertical motion while exiting the previous character.
valuenumberRequired
padnumberanimationDelaynumberDefault 80
startOnViewbooleanDefault true
localebooleanformat(value: number) => stringgapnumberDefault 2
direction"dynamic" | "up" | "down"Default dynamic
enterStiffnessnumberDefault 170
enterDampingnumberDefault 10
exitStiffnessnumberDefault 170
exitDampingnumberDefault 15
enterYnumberDefault 32
enterBlurnumberDefault 52
enterScalenumberDefault 0.7
classNamestringdigitClassNamestringNon-digit characters from locale separators or custom formatters render as static spans and do not animate.
The visual layer is `aria-hidden`; screen readers receive the formatted number through an `sr-only` span.
When `startOnView` is enabled, the ticker displays zero until the container crosses the viewport threshold (`once: true`, `amount: 0.6`).
Each digit keeps a short exit queue so the previous character can blur and slide out while the next one springs into place.
Layer symbols such as `%` or `$` beside the component in your layout, or include them through `format`.
Registry bundle
Install the exact registry entry shown on the right when you want the component file and its declared runtime dependencies together.
Dependencies: motion.