Components › Display

Count up

A number that climbs to its new value. Still under reduced motion.

Installation

npx plankui@latest add count-up

Usage

import { CountUp } from "@/components/ui/count-up";

<CountUp value={48210} format={(n) => "
quot; + Math.round(n).toLocaleString()} />

API reference

PropTypeDefaultDescription
valuenumberrequiredTarget value.
durationnumber900Milliseconds.
format(n: number) => stringtoLocaleStringFormats each frame.

View the source on GitHub