Back to docs
Animation

Number Counter

Animated numeric transitions for KPI values.

Install

npx shadcn@latest add @native-bits/number-counter

Dependencies

react-native-reanimated
Try in Sandbox
animationdatamobile

Props

PropTypeDefaultDescription
fromnumber0Initial value
tonumber-Target value
durationnumber900Animation duration in ms

Usage

```tsx
import { number-counter } from '@/components/native-bits/number-counter'

<NumberCounter from={0} to={18420} duration={900} />
```

Source code

Loading...