Card
Card container with optional border and variant-based background.
Usage
Best practices
Compose structure with
CardHeader/CardContent/CardFooterrather than raw padded divs - the root supplies the gap rhythm and drops its bottom padding when a footer is present, viadata-slotselectors.Set
inseton theCard(not on its parts) to change the padding around header and content;inset="none"gives a card with no padding or gaps for aTableor code block. "Flush" covers header and content only:CardFooterkeeps its own 16px padding whatever the inset.Pass
shadow={false}when stacking cards on amuted/shaded canvas - colour contrast separates them and per-card shadows read as noise.For a full-bleed media/CTA panel use an editorial composite (
EditorialCard), notCard-Cardis a neutral padded container, not a marketing surface.
Props
Card
CardHeader
Also exports
- component
CardAction - const
cardAnatomy - component
CardContent - component
CardDescription - component
CardFooter - component
CardTitle
Anatomy
Composition
Builds on
Used by