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#
Every variant has an outer border, and the header looks the same as the body. outline (default)
adds a top border to the footer. subtle adds the footer divider and a muted footer background.
none keeps only the outer border and the part spacing. 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#
Deploy a project from a summary card#
Pair a heading, description, and footer actions when the card is the decision surface.
Publish a release announcement#
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.
Open a gallery item#
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.
Save meeting notes#
Put a header action next to the title when the command belongs to the whole record, not the footer.
Warn about storage usage#
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.