Animated Counter
Animationsinline sandboxA number counter that animates from 0 to the target value using GSAP. Great for statistics and metrics.
animated counter
odometer counter
number counter
react counter component
gsap animation
Preview
For best results, use tabular-nums font feature on the counter container.
This component requires GSAP 3.x or higher.
Installation
Use the shadcn CLI to install this component:
npx shadcn@latest add https://messyui.dev/r/animated-counter.jsonProps
| Prop | Type | Default | Description |
|---|---|---|---|
| target | number | 1234 | The target number to count to |
| duration | number | 2 | Animation duration in seconds |
| prefix | string | "" | Text before the number |
| suffix | string | "+" | Text after the number |