Animated Number
Easily animate numbers.
Examples
Basic
0
Basic counter
1,000
With useInView
0
Installation
npx shadcn add "https://motion-primitives.com/c/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. |