Mobile › Display
CountUp
A number that counts up to its value when it appears or changes, for dashboards and results.
Installation
npx expo install plankui-mobile react-native-safe-area-context expo-hapticsUsage
import { CountUp } from "plankui-mobile";
<CountUp value={12480} prefix="€" variant="largeTitle" />
<CountUp value={99.98} decimals={2} suffix="%" />API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | The number to land on. Screen readers hear only this. | |
| from | number | 0 | Where to start. |
| decimals | number | 0 | Decimal places. |
| prefix | string | – | Before the number, such as a currency sign. |
| suffix | string | – | After the number, such as %. |
| duration | number | 1200 | Milliseconds. It lands at once under reduced motion. |
| variant | TypeVariant | 'title' | Text size on the type scale. |