Card
Surface primitive for grouped content and actions.
Quick Preview
Pre-approval
Complete the affordability check before booking a tour.
Estimated completion: 3 minutes
You can save your progress and return at any time.
Composition
Use this public composition when building Card:
Card
├── CardAction (optional)
├── CardHeader
│ ├── CardTitle
│ └── CardDescription
├── CardContent
└── CardFooterUsage
<Card>
<CardHeader>
<CardTitle>Pre-approval</CardTitle>
<CardDescription>Complete your affordability check.</CardDescription>
</CardHeader>
<CardContent>Ready for review.</CardContent>
<CardFooter>
<Button>Continue</Button>
</CardFooter>
</Card>Examples
Default Card
Use this as the starting point for Card. Keep product data, routing, fetching, and authorization logic in the consuming app.
Pre-approval
Complete the affordability check before booking a tour.
Estimated completion: 3 minutes
You can save your progress and return at any time.
Multiple Selection with Checkboxes
Use a controlled Checkbox when people can select more than one option. Rendering CardAction as a label makes the full card a pointer target while the checkbox remains the keyboard-accessible control.
Selection with an Explicit Button
Use a button when selection should be a deliberate action rather than an implicit card click. Pass the same state to Card.selected and the button's aria-pressed attribute.
Single Selection with Radio Cards
Use a RadioGroup when exactly one option can be selected. Each CardAction is rendered as a label so the full card selects its associated radio item.
Interaction Patterns
- Use
selectedonly for presentation; keep the selection state in a checkbox, radio group, or button in the consuming app. - Use
CardActionfor whole-card interaction instead of rendering theCarditself as a button or link. - Render
CardActionas alabelassociated with a checkbox or radio item when the form control owns selection. - Add
className="relative z-20"to secondary controls inside a card withCardActionso they remain above its full-card target.
Props
| Prop/API | Type | Default | Description |
|---|---|---|---|
selected | boolean | false | Applies selected visual state. |
removePadding | boolean | false | Removes only the root vertical padding. Slots still use the root --card-padding variable for horizontal padding. |
render | Base UI render prop | - | Changes the rendered element while preserving styles. |
className | string | - | Local layout or spacing overrides. |
| native/root props | React component props | - | Passed through to the underlying root or primitive. |
Accessibility
- Preserve the documented Card composition so labels, triggers, content, and controls remain connected.
- Match
Card.selectedto the checked or pressed state of the control that owns selection. - Provide visible labels or accessible names for interactive controls.
- Preserve the component-provided focus, keyboard, disabled, and invalid-state behavior.
- Do not communicate state with color alone; include text, icons, or helper copy.