Overview
Metric Cards are used to display key quantitative data on dashboards. Each card shows one primary metric, equipped with a trend indicator (positive/negative), and an optional action button to view a detailed report.Views 24 hours⋮
2,000
↑ 100
↗
⋮Views 24 hours
2,000
↑ 100
↗
Views 24 hours2,000
↗ 100%vs last month
Views 24 hours⋮
2,000
↗ 100%vs last month
Installation
Usage
Type Variants
Metric Cards have 4 types that determine how the metric is visualized.- Simple
- Icon 01
- Icon 02
- Chart
The most compact type — displays only the label, metric number, and a trend badge aligned to the bottom-right of the number. Ideal for simple metrics without additional visual context.
Views 24 hours⋮
2,000
↑ 100
Bounce Rate⋮
4,120
↓ 40
Actions
Theactions prop adds a “View report” button at the bottom of the card, which can be used to navigate to a detailed report page.
actions=false (default)
Views 24 hours⋮
2,000
↑ 100
actions=true
Trend Indicator
Every Metric Card displays a trend indicator to show the change compared to the previous period.Badge (Simple & Icon 01)
↑ 100 Positive↓ 40 Negative
Change Text (Icon 02 & Chart)
↗ 100% vs last month↘ 12% vs last month
Breakpoints
- Desktop
- Mobile
Card width is 388px, with 24px padding on all sides.
Design Tokens
Card
Typography
Featured Icon (Icon 01)
Featured Icon (Icon 02)
API Reference
MetricCard
"simple" | "icon-01" | "icon-02" | "chart"
required
The display type of the metric card.
string
required
The metric label text, displayed above the number.
string | number
required
The primary metric value displayed large (e.g.
"2,000", "89%")."positive" | "negative"
required
The direction of the metric change — determines the color and icon of the trend indicator.
number
required
The numeric change value (e.g.
100 → displayed as ↑ 100 or 100%).string
default:"\"vs last month\""
The descriptive text for the change. Only shown on
icon-02 and chart types.ReactNode
The icon displayed in the featured icon area. Required for
icon-01 and icon-02 types.number[]
Data array for the sparkline chart. Required for the
chart type.boolean
default:"false"
If
true, displays a “View report” button at the bottom of the card (Desktop only).() => void
Callback fired when the “View report” button is clicked. Required when
actions is true."desktop" | "mobile"
default:"\"desktop\""
The rendering breakpoint of the card. Mobile does not support the
actions prop.string
Additional class name for custom styling.
Accessibility
- Use a descriptive
aria-labelon the card for screen readers, e.g.aria-label="Views 24 hours: 2,000, up 100 from the previous period" - Trend icons should include
aria-hidden="true"since they are already represented by the change text - The “View report” button must have clear text or an
aria-labelif it only shows an icon - Ensure the trend badge color contrast meets WCAG AA (green
#027A48on#ECFDF3✓) - The sparkline chart should include
role="img"and anaria-labeldescribing the trend
Do’s & Don’ts
Do
- Use one metric per card
- Ensure
changeLabelprovides clear context (e.g. “vs last week”) - Choose the
charttype for metrics with significant fluctuations that need to be visualized - Arrange cards in a 3–4 column grid on desktop
- Use the
icon-01type for metrics with a clear visual category (sales, traffic, etc.)
Don't
- Don’t display more than one large number per card
- Don’t use the
charttype for static data (with no change over time) - Don’t let
valueget too long — truncate if needed (e.g.2.3Mnot2,312,400) - Don’t hide the trend indicator — always provide change context
- Don’t use
actions=truewithout a workingonViewReporthandler