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-haptics

Usage

import { CountUp } from "plankui-mobile";

<CountUp value={12480} prefix="€" variant="largeTitle" />
<CountUp value={99.98} decimals={2} suffix="%" />

API reference

PropTypeDefaultDescription
valuenumberThe number to land on. Screen readers hear only this.
fromnumber0Where to start.
decimalsnumber0Decimal places.
prefixstring–Before the number, such as a currency sign.
suffixstring–After the number, such as %.
durationnumber1200Milliseconds. It lands at once under reduced motion.
variantTypeVariant'title'Text size on the type scale.