Skip to content

Stat Card

StatCard is the standard dashboard metric tile. Use it to surface a single KPI with optional context: a trend indicator (up/down/neutral), a comparison hint (e.g. “vs last month”), and an icon. Grid a set of them at the top of a dashboard to give users an instant overview.

Live demo

Usage

import { StatCard } from "@beacon/design-system";
// Basic
<StatCard label="Open Invoices" value="$142,500" />
// With trend
<StatCard
label="Collected This Month"
value="$38,200"
delta="+12%"
deltaTone="up"
hint="vs last month"
/>
// Negative trend
<StatCard
label="Overdue Balance"
value="$9,400"
delta="+$1,200"
deltaTone="down"
hint="vs last month"
/>
// With icon
<StatCard
label="Active Projects"
value="47"
icon={<ProjectIcon />}
/>

Props

PropTypeDefaultDescription
labelReactNode—Metric name shown above the value. Required.
valueReactNode—Primary metric value (number, currency, percentage). Required.
deltaReactNodeundefinedChange indicator (e.g. "+12%", "-$400").
deltaToneStatDeltaTone"neutral"Colors the delta indicator.
hintReactNodeundefinedSmall caption below the delta (e.g. "vs last month").
iconReactNodeundefinedIcon rendered in the top-right corner of the card.

StatDeltaTone values

ValueMeaning
"up"Positive change. Renders in success green.
"down"Negative change. Renders in danger red.
"neutral"No directional meaning. Renders in muted content color.

Note: “up” and “down” are directional, not inherently good or bad. An increase in overdue balance is deltaTone="down" even though the number went up.

Design tokens used

TokenRole
--ds-color-surface-raisedCard background.
--ds-color-border-defaultCard border.
--ds-color-content-defaultValue text.
--ds-color-content-dimLabel text.
--ds-color-content-mutedHint text and neutral delta.
--ds-color-status-successDelta tone "up".
--ds-color-status-dangerDelta tone "down".
--ds-radius-mdCard border radius.
--ds-space-mdCard padding.

When to use

Dashboard summary rows, executive overview panels, and any context where a single metric and its trend need to be scannable at a glance. Grid four to six StatCards in a responsive row at the top of a dashboard page.