Animated Number
Easily animate numbers.
Examples
Basic
Basic counter
With useInView
Installation
npx shadcn@latest add https://ui.ndekocode.dev/r/motion-animated-number.json
Component API
| Prop | Type | Default | Description |
|---|
| value | number | | The number to be animated. |
| className | string | | Optional CSS class for styling the number item container. |
| springOptions | SpringOptions | | Spring options from motion for the animation. |
| as | React.ElementType | 'span' | The HTML tag to render the number in. |