Card

Container for grouping related content

Category: display · WCAG 2.2-AA · container, layout, surface

Variants

Props

PropTypeDefaultDescription
actionsReactNodeCardHeader only — trailing content pinned to the inline-end (overflow menu, badge, link). The header is a column by default, so `justify-content: space-between` alone does nothing; this is how you get the title-left / action-right dashboard card.
variant'default' | 'outlined' | 'elevated'default`default` draws a 1px border, `outlined` a heavier one, `elevated` drops the border for a shadow.
padding'none' | 'sm' | 'md' | 'lg'mdInner padding of the CARD BOX. ⚠ `padding="none"` deliberately does NOT strip the padding from CardHeader/CardContent/CardFooter — those keep their own. It means "let a flush child (a LogViewer, an image, an edge-to-edge table) reach the card's edge"; zeroing both put the title flush against the border and made the mode unusable with the composition it exists for. For an edge-to-edge table, skip CardContent and pass the table as a direct child.

Design tokens

When to use

When not to use

How to build an accessible Card in React →

Examples

Basic card

<Card>
  <CardHeader><CardTitle>Title</CardTitle></CardHeader>
  <CardContent>Content here</CardContent>
</Card>

Related components

← Back to docs