Velocity X Components

Stats & Numbers

Cumulative Total Card

A lifetime running total — total revenue, total signups, total units shipped — with the current period's own contribution called out underneath, so a reader sees where things stand and what just moved the needle in one card instead of two.

Subscription Included with the Velocity Components subscription.
bash
$ velocityx add cumulative-total-card

Built for astro.

Full docs for Cumulative Total Card →

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

astro v1.0.1
Cumulative Total Card
Total revenue

$1,842,300

up, added this month

Props

NameTypeRequiredDefaultDescription
labelstringNo'Total revenue'
totalnumberNo1842300
prefixstringNo''
suffixstringNo''
decimalsnumberNo0
durationnumberNo1400
periodLabelstringNo'added this month'
periodValuenumberNo96200
periodDirection'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/cumulative-total-card/CumulativeTotalCard.astro

Using the Cumulative Total Card component

Install it with velocityx add cumulative-total-card. 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.