Velocity X Components

Stats & Numbers

Metric Comparison Grid

A grid of metric cards for a monthly or quarterly review, each one showing two periods side by side with its own delta. A per-metric goodDirection flag lets churn or latency colour correctly when down is the win, instead of every metric reading green-for-up.

Subscription Included with the Velocity Components subscription.
bash
$ velocityx add metric-comparison-grid

Built for astro.

Full docs for Metric Comparison Grid →

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

astro v1.0.1
Metric Comparison Grid

Revenue

12.4% increased

This month

$48.2k

Last month

$42.9k

New customers

13.8% increased

This month

214

Last month

188

Churn

0.5pp decreased

This month

1.8%

Last month

2.3%

Props

NameTypeRequiredDefaultDescription
metricsComparisonMetric[]Yes
periodALabelstringNo'This period'
periodBLabelstringNo'Last period'
columns2 | 3 | 4No3
classNamestringNo''

File this creates

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

text
components/velocity/metric-comparison-grid/MetricComparisonGrid.astro

Using the Metric Comparison Grid component

Install it with velocityx add metric-comparison-grid. 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.