Velocity X Components

Stats & Numbers

Count-Up Metric with Delta Badge

A single large figure that counts up the moment it scrolls into view, paired with a directional change badge. No chart library, no runtime dependency — locale-safe number formatting and a permanent screen-reader value so the real number is never hidden behind the animation.

Subscription Included with the Velocity Components subscription.
bash
$ velocityx add count-up-delta-stat

Built for astro.

Full docs for Count-Up Metric with Delta Badge →

Needs a licence key — subscribe here, then velocityx loginonce.

astro v1.0.1
Count-Up Metric with Delta Badge
Revenue

$128,400

+12.4% increased

Props

NameTypeRequiredDefaultDescription
labelstringNo'Monthly recurring revenue'
valuenumberNo48200The number to count up to.
decimalsnumberNo0Decimal places to render, e.g. 1 for "4.2".
prefixstringNo''
suffixstringNo''
durationnumberNo1400Count-up duration in ms.
deltastringNo'12.4%'
deltaDirection'up' | 'down' | 'flat'No'up'
classNamestringNo''

File this creates

The CLI writes this path into your project, relative to its root — nothing else moves.

text
components/velocity/count-up-delta-stat/CountUpMetric.astro

Using the Count-Up Metric with Delta Badge component

Install it with velocityx add count-up-delta-stat. The CLI writes the source straight into your project — no runtime dependency, no registry lock-in, and it themes itself from the same primary-*/accent-* scale as the rest of the library.

More from Stats & Numbers.