Card

A bordered, padded container, only for an interactive panel (controls, a form, a configurator). Tables, charts and text do not need one. Give it a Title and a Caption. Separate the groups in it with a Divider or the plain gap, never with a nested Card or a bordered Box. Variant "section" is a heading and content without a box. Variant "outline" always has a box. In markdown mode, a Card without controls renders as "section" unless it sets variant or border.

Examples

Loading examples…

Props

PropTypeDescription
align"start" | "center" | "end" | "baseline" | "stretch"
justify"start" | "center" | "end" | "spaceBetween" | "spaceAround" | "spaceEvenly" | "stretch"
wrap"nowrap" | "wrap" | "wrap-reverse"
gapnumber | string4px steps when a number
rowGapnumber | string
columnGapnumber | string
paddingnumber | string4px steps when a number
backgroundstringOne of surface|surface-secondary|surface-tertiary|surface-elevated|surface-elevated-secondary|surface-inverted|surface-soft|info|warning|caution|success|danger|discovery|info-solid|warning-solid|caution-solid|success-solid|danger-solid|discovery-solid or a CSS color. Leave it unset. Only one summary panel in a Card can use "surface-secondary"
borderboolean
borderColor"default" | "subtle" | "strong" | "info" | "warning" | "caution" | "success" | "danger" | "discovery"
radius"2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "full" | number | string | object
widthnumber | string
heightnumber | string
minWidthnumber | string
maxWidthnumber | string
minHeightnumber | string
maxHeightnumber | string
flexnumber
weightnumberflex-grow in a Row or Column
aspectRatiostring
scrollableboolean
clipboolean
shadowboolean
inlineboolean
rolestringARIA role
flushbooleanNo padding
minSizenumber | stringMinimum width and height
maxSizenumber | stringMaximum width and height
disableAutoSpacingbooleanNo default gap between children
variant"default" | "outline" | "section" | "soft" | "elevated" | "transparent"
shadowStyle"none" | "sm" | "md"Overrides the shadow of the variant
size"sm" | "md" | "lg"The padding preset: 8, 16 or 24px. Default "md"

Slots

  • child · single
  • children · multiple

Events

  • onVisible · Sent once, the first time the container scrolls into view. Use it to load more content lazily.

Link to Card · All standard components

On this page