Skip to content

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

Metric cardLive · light and dark follow the theme switch

Add the source to a shadcn project

npx shadcn@latest add https://docs.atomus.io/r/metric-card.jsonOpen in v0

Installs the component source, its CSS and the Atomus tokens into components/atomus/. How the registry works

From guidelines/components/metrics-feeds.md · Open in Figma: MetricCard

Properties, variants and anatomy of the Figma components. React props use the same names.

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.

Full types and defaults are in React API at the end of the page.

  • label, value (pre-formatted), type simple · trend · chart (Figma: Type).
  • change, caption (“vs last month”), trend (inferred from a leading “-”), data for the chart sparkline, action.

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.

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.

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 …).