- Location:
sabo/src/components/ui/number-ticker.tsx
When to use
- Show KPI counts that animate into place (e.g., “12,345 users”).
- Prefer short ranges to avoid long-running animations.
Usage
sabo/src/components/ui/number-ticker.tsx
Key props
number
The target number to animate to.
number
default:"0"
The number to start the animation from.
'up' | 'down'
default:"'up'"
Animation direction: count up or down to the target value.
number
default:"0"
Delay in seconds before starting the animation.
number
default:"0"
Number of decimal places to display.
string
Additional CSS classes applied to the span element.
Styling tip
- Use large, bold typography and monospace figures for consistent width (
tabular-nums). - Avoid combining with other animations in the same viewport to reduce motion overload.