Back to docs
Animation
Number Counter
Animated numeric transitions for KPI values.
Install
npx shadcn@latest add @native-bits/number-counterDependencies
react-native-reanimated
animationdatamobile
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| from | number | 0 | Initial value |
| to | number | - | Target value |
| duration | number | 900 | Animation duration in ms |
Usage
```tsx
import { number-counter } from '@/components/native-bits/number-counter'
<NumberCounter from={0} to={18420} duration={900} />
```Source code
Loading...