⚠️ Design system CSS not found. Check the path in cms/docs.config.js → designSystemPath, then re-run npm run docgen.

Card

Contained content surfaces

Design System / Card
Download .md file
Open .md in new tab

Cards are surface containers that group related content with a border and background. They support padding modifiers and an interactive (clickable) variant.

Scope. is deliberately minimal — a surface, not a layout. Structured card families (media + logo + meta + actions, testimonial cards, post cards) are app-layer compositions: build them in your own CSS on top of the system's tokens and layout primitives, rather than expecting variants here. If the same structured card shape emerges across three real consumers, propose promoting it (Layer Rule 7).


Basic usage

Card content goes here. Cards provide a contained surface for grouping related information.

<div class="card">
  <p>Card content goes here.</p>
</div>

Flush card

Remove internal padding with , useful when the card contains a full-bleed image or nested content that manages its own spacing.

Full-bleed content area
<div class="card card--flush">
  <!-- Content manages its own padding -->
</div>

Interactive card

Wrap in an <a> tag with for clickable cards. Adds hover shadow and focus ring.

Clickable card

Clickable card

This entire card is a link.

<a class="card card--interactive" href="#">
  <h3 class="card-title">Clickable card</h3>
  <p class="card-description">This entire card is a link.</p>
</a>

Image card

Combine with to create a clickable card with a full-bleed image. The and classes handle display and border-radius. Use a padded inner wrapper for the text content.

Example image

Card with image

Supporting text below the image.

<a class="card card--flush card--interactive" href="#">
  <img class="img img-16x9 card-image" src="image.jpg" alt="Description">
  <div style="padding: var(--space-xl);">
    <h3 class="card-title">Card with image</h3>
    <p class="card-description">Supporting text below the image.</p>
  </div>
</a>

Accessibility

  • Use semantic HTML inside cards (<h3>, <p>, <ul>, etc.)
  • Interactive cards (<a>) automatically receive focus ring on focus-visible
  • If a card contains multiple interactive elements, do not wrap the entire card in an <a>

Usage rules

Do:

  • Use cards to group related content visually
  • Use when content needs full-bleed layout

Don't:

  • Don't nest interactive cards inside other interactive elements
  • Don't use cards purely for visual decoration. They should contain meaningful content

CSS reference

This section documents how the component is built. For usage, see the sections above.

Styling

Property Value
Background (dark: )
Border var(--border-s) solid var(--border-faded)
Radius
Padding

Selectors

Selector Purpose
Base component: background, border, radius, padding
Removes padding
Adds hover background, shadow, focus ring, and link styling
Card heading, resets margin
Card body text, secondary text colour
Full-bleed image with top border-radius
On this page
  • Basic usage
  • Flush card
  • Interactive card
  • Accessibility
  • Usage rules
  • CSS reference
Previous

Tooltip

Next

Asset Card

Was this page helpful?

We use this feedback to improve our documentation.

Thanks for your feedback

Send feedback

© 2026 By Default