Cards

Flexible containers that group related content. Cards support multiple variants, sizes, and sub-components for structured layouts.

Card Variants
Elevated (Default)

Elevated Card

With drop shadow

Default variant with subtle elevation shadow for visual depth.

Outlined

Outlined Card

Border only

Flat design with a border. No shadow for minimal visual weight.

Filled

Filled Card

Background tint

Solid background fill. Ideal for nested or grouped cards.

Card Sizes

Small

Compact padding for dense layouts.

Medium (Default)

Standard padding for most use cases.

Large

Generous padding for prominent cards.

Interactive & Selectable Cards

Option 1

Click to select

Option 2

Click to select

Option 3

Click to select

Selected: None
JSX
<Card
  interactive
  selected={isSelected}
  onClick={() => setSelected(!isSelected)}
>
  <CardBody>
    <CardTitle>Selectable Card</CardTitle>
    <p>Click to select this card</p>
  </CardBody>
</Card>

Card Sub-components

Cards support multiple sub-components for structured layouts: CardMedia, CardHeader, CardTitle, CardSubtitle, CardBody, CardActions, and CardFooter.

Featured Card

With media and actions

New

This card demonstrates all available sub-components working together.

DesignUI/UX
<Card>
  <CardMedia>
    <img src="/image.jpg" alt="..." />
  </CardMedia>
  <CardHeader>
    <CardTitle>Featured Card</CardTitle>
    <CardSubtitle>With media and actions</CardSubtitle>
  </CardHeader>
  <CardBody>
    <p>Card content goes here...</p>
    <div>
      <Chip size="sm">Design</Chip>
      <Chip size="sm">UI/UX</Chip>
    </div>
  </CardBody>
  <CardActions>
    <Button variant="ghost" leftIcon={<HeartIcon />}>
      Like
    </Button>
    <Button variant="ghost" leftIcon={<ShareIcon />}>
      Share
    </Button>
  </CardActions>
  <CardFooter>
    <Button variant="secondary">Cancel</Button>
    <Button variant="primary">View Details</Button>
  </CardFooter>
</Card>

Interactive Card

Hover to see effect

Interactive cards respond to cursor position with elevation changes.

Current State: default
default
Resting state with base card shadow
hover
Shadow expands and card lifts (-4px)
active
Brief click state, returns to hover

Best Practices

Do

Clear Hierarchy

Use sub-components for structure

Use CardHeader, CardBody, CardFooter for organization
Clickable Card

Entire card is interactive

Use interactive prop for clickable cards

Don't

Sparse content in large interactive area

Don't make large cards interactive without clear purpose

Nested cards create visual confusion

Avoid deeply nested elevated cards

Props Reference

Card

PropTypeDefaultDescription
variant'elevated' | 'outlined' | 'filled''elevated'Visual style variant
size'sm' | 'md' | 'lg''md'Padding size
interactivebooleanfalseEnable hover lift effect
selectedbooleanfalseSelected state (shows primary border)

Sub-components

ComponentDescription
CardMediaContainer for images/media at top of card
CardHeaderHeader section with border-bottom
CardTitleStyled title (supports as prop for semantic heading)
CardSubtitleSecondary text below title
CardBodyMain content area
CardActionsInline action buttons (e.g., Like, Share)
CardFooterFooter with action buttons, aligned right