Design System
Data display

Card

A surface that groups related content and actions into a panel. The building block most dashboard layouts are made of.

Purpose

A card draws a boundary around content that belongs together. For a single headline figure — a number, a delta, an optional trend — do not compose one by hand: the Stat card widget is that exact composition, kept consistent across every dashboard. Reach for a plain Card when the content is anything richer: a form section, a list panel, a chart with commentary.

Example

Claims this month
Across all benefit groups

3,219

+1.1% vs last month

Full composition

All five parts together. CardHeader stacks the title and description; CardContent carries the body; CardFooter is a flex row for actions.

Renew corporate plan
Coverage ends 30 September 2026

412 members will be carried over to the new plan year. Entitlement balances reset on renewal.

Every part is optional — a Card with only CardContent is a perfectly good panel.

Structure

The tokens behind the surface.

PropertyValue
Container1px --border, --card fill, --card-foreground text
Radius--radius-lg (8px)
Shadow--shadow-2 — the "cards at rest" step of the elevation ramp
Header24px padding (p-6), 6px stack gap (gap-1.5)
Title16px / Inter 600 (text-base font-semibold)
Description14px --muted-foreground (text-sm)
Content / Footer24px padding, flush to the header (p-6 pt-0)

Best practices

Do

  • Keep one subject per card — if the title needs an "and", split it.
  • Use CardDescription for a one-line qualifier; body copy belongs in CardContent.
  • Put actions in CardFooter, with at most one primary button.
  • Reach for the Stat card widget for headline figures instead of rebuilding it.

Don't

  • Make the whole card a click target — put the link or button inside it, where it can be focused and named.
  • Nest cards; a border inside a border reads as clutter, not hierarchy.
  • Use a card as a page wrapper — cards group content, the layout grid arranges the page.

Accessibility & keyboard

  • Card and all its parts render plain <div>s — no role, no landmark, no heading semantics. The structure screen readers hear is entirely what you put inside.
  • CardTitle styles a <div>; when the card titles a section of the page, nest a real heading (<h2>/<h3>) inside it so the document outline stays intact — the heading inherits the title's styling.
  • Keep heading levels sequential across a grid of cards — a wall of <h5>s under an <h1> skips the outline levels in between.
  • Keyboard: none of the card's own — only the interactive elements you place inside it receive focus, in DOM order.

Props

Every part is a styled <div> — each accepts any HTML attribute (className, id, data attributes…) and adds no props of its own.

Every Card part in Storybook

On this page