Card
Group related content and actions on a neutral surface.
Manage billing and team seat limits.
Your team has 8 active seats out of 10 available. Upgrade to Enterprise for unlimited seats and SSO integration.
Anatomy#
Usage#
Use Card to group related content and actions on a neutral surface. Its parts are structural and add no interactive behavior or ARIA relationships.
The root, Card.Title, and the other parts render a div by default (Card.Description renders a
p); set as to change the element, such as a heading for the title or article for the root.
Variants and sizes#
variant sets the surface; the header always shares the body surface:
outline(default): draws the outer border and shadow and a top border on the footer.subtle: adds a muted footer background.none: drops the outer border, shadow, and footer divider and keeps only the background and part spacing, for a card nested inside another bordered surface.
The sm, md (default), and lg sizes change the density of the header, body, footer, title, and
description together. Set variant and size on Card; the parts inherit them.
Parts#
Compose the parts you need inside Card. Header and body provide horizontal insets, while the root
spaces the sections. Direct children can still span the card’s full width.
Place a control for the whole card in Card.Action, which sits at the end of the header beside the
title and description. Place other actions in Card.Footer.
Examples#
Basic#
Compose Card.Header, Card.Body, and Card.Footer for a standard card layout.
Semantics#
Card does not choose a heading level. Set as on Card.Title to the level that fits the page, such
as h2, and set as="article" on Card when the card is a standalone story.
With media#
Place media directly inside Card to span its width. Clip overflow on the root with overflow-hidden
only if the image must follow the card radius.
Header action#
Use Card.Action to place a control alongside the title in the header.
Custom header#
Replace Title and Description with custom header markup when the headline is a metric rather than a label.
API Reference#
Props#
Card#
Props for Card. Renders a <div> element by default.
Header#
Renders a <div> element by default.
Title#
Renders a <div> element by default.
Description#
Renders a <p> element by default.
Action#
Renders a <div> element by default.
Body#
Renders a <div> element by default.
Footer#
Renders a <div> element by default.