A number whose digits roll like an odometer. It rolls up when scrolled into view and again whenever the value changes. Screen readers get the plain number.
Install it the shadcn way: copy the source file into your project. It uses CSS 3D, Tailwind CSS v4 and Framer Motion, no WebGL.
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | The number to show. | |
| decimals | number | 0 | Digits after the decimal point. |
| prefix | string | "" | Text before the number, like "quot;. |
| suffix | string | "" | Text after the number, like "%" or "k". |
| separator | boolean | true | Show thousands separators (1,234). |
| duration | number | 1.2 | Seconds each digit takes to settle. Digits further left start slightly later. |
| startOnView | boolean | true | Roll in when scrolled into view. Turn off to roll immediately. |
| className | string | Extra classes added to the outer element. Set the size with a text-size class. |