Skip to main content
The Card component is a layout primitive for grouping related content with consistent styling.

Import

Usage

Props

string
default:"'primary'"
Card variant from theme.cards. The component uses primary variant by default.
ThemeUIStyleObject
Theme-aware styles for custom card appearance.
React.ElementType
Render as a different HTML element. Defaults to div.

Inherited Props

Card extends Box and accepts:
  • All standard HTML div attributes (or attributes for the element specified with as)
  • Box spacing props (m, p, mx, my, px, py, etc.)
  • Box color props (color, bg, opacity)

Composition

Cards are designed to be composed with other Theme UI components:

Examples

Basic Card

Card with Image

Interactive Card

Card Grid

Clickable Card

Card with Badge