Card

Grouped content surface with optional media, header, body, and footer actions.

Examples

Properties

PropertyAttributeDescriptionType nameTypeDefault
titletitleCard heading when the `title` slot is empty.stringstring""
subtitlesubtitleSecondary line under the title.stringstring""
texttextBody copy when the default slot is empty.stringstring""
imageSrcimage-srcTop image URL when the `media` slot is empty.stringstring""
imageAltimage-altAccessible name for the `image-src` image (default `"card image"`).stringstring"card image"
titleTagtitle-tagHeading element for `title` (default `h3`).DuoCardTitleTag"h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "div""h3"
interactiveinteractiveStronger shadow on hover/focus-within (Figma hover state).booleanbooleanfalse
accessibleLabelaria-labelAccessible name when no visible title (rare; prefer `title` / `title` slot).string | undefinedstring | undefined—

Slots

NameDescription
mediaTop image or illustration (overrides `image-src` when provided).
titleCustom title markup (overrides the `title` attribute).
subtitleCustom subtitle markup (overrides the `subtitle` attribute).
headerFull header region (overrides built-in title / subtitle / `header-actions`).
header-actionsHeader toolbar (e.g. action menu button).
defaultBody content between header and footer.
actionsFooter actions (e.g. `<duo-button>`).

Usage

Card presents a bounded content tile: optional top media, a header (title, subtitle, and optional header actions), body copy, and optional footer actions. It matches Figma data display / card.

Do

  • Set title (or the title slot) so the card has a clear heading; default title-tag is h3.
  • Use image-src / image-alt or the media slot for top imagery; use actions for footer buttons.
  • Put menus or icon controls in header-actions.
  • Enable interactive when the whole card is hoverable (e.g. clickable tile) to match Figma hover elevation.

Don’t

  • Don’t use a card for page layout shells — use duo-stack or duo-box.
  • Don’t use a card for blocking dialogs — use duo-modal.
  • Don’t rely on color alone in footer actions — button labels must stay readable.

Slots

SlotPurpose
mediaTop image or custom media (overrides image-src)
titleCustom title markup
subtitleCustom subtitle markup
headerFull header override
header-actionsHeader toolbar or menu
(default)Body content
actionsFooter buttons