Metric card
A single KPI for dashboards.
Active projects
128
Monthly revenue
$48.2k
12%vs last month
New signups
2,431
18%vs last week
Churn
1.8%
-0.4%vs last month
Add the source to a shadcn project
npx shadcn@latest add https://docs.atomus.io/r/metric-card.jsonOpen in v0Installs the component source, its CSS and the Atomus tokens into components/atomus/. How the registry works
In Figma
Section titled “In Figma”From guidelines/components/metrics-feeds.md · Open in Figma: MetricCard
Properties, variants and anatomy of the Figma components. React props use the same names.
Metric card
Section titled “Metric card”KPI / stat card for dashboards and marketing.
Variants: 3
| Property | Type / options |
|---|---|
| Label | text |
| Value | text |
| Type | Simple · Trend · Chart |
import { MetricCard } from '@stanvision/atomus-react';
<MetricCard label="Monthly revenue" value="$48.2k" change="12%" caption="vs last month" />A single KPI for dashboards.
Props at a glance
Section titled “Props at a glance”Full types and defaults are in React API at the end of the page.
label,value(pre-formatted),typesimple·trend·chart(Figma: Type).change,caption(“vs last month”),trend(inferred from a leading “-”),datafor the chart sparkline,action.
Design guidance
Section titled “Design guidance”From the Figma guidelines.
Do
- Lead with the number.
- Use Trend to show change against a stated period.
- Keep units in the value (“$48.2k”, “12%”).
Forbidden
- Never show more than four metric cards in a row.
- Never mix time periods in one row.
- Never colour-code a change without the arrow.
React API
Section titled “React API”Generated from react/src/components by scripts/gen-react-api.mjs — the same tables agents read in guidelines/components/metrics-feeds.md.
Use only these props; anything else is not part of the API.
MetricCard
Section titled “MetricCard”import { MetricCard } from '@stanvision/atomus-react'; — source: react/src/components/MetricCard.tsx
| Prop | Type | Default | Description |
|---|---|---|---|
label |
ReactNode |
required | Figma: Label |
value |
ReactNode |
required | Figma: Value — pre-formatted (“$48.2k”) |
type |
'simple' | 'trend' | 'chart' |
'trend' |
Figma: Type — simple · trend · chart |
change |
string |
— | Change vs the comparison period, e.g. “12%” or “-0.4%” |
trend |
'up' | 'down' |
— | Inferred from a leading “-” in change when omitted |
caption |
ReactNode |
— | Comparison period, e.g. “vs last month” |
data |
number[] |
— | Sparkline values for type=“chart” |
action |
ReactNode |
— | Header action, e.g. a tertiary icon button |
Also accepts every native <div> attribute (id, role, onClick …).