Card
Data displayshadcn/uiGroups related content on a light gray surface over a white canvas. Flat: no shadow, no border by default.
When to use
- Use default cards on the white canvas and CardInset for content inside them.
- Use one inverse card to highlight the key number of a screen (e.g. balance).
- Make the whole card clickable only when it has a single destination.
- Don't nest a Card inside a Card; use CardInset.
- Don't add shadows or gradients.
- Don't put more than two buttons in a CardFooter.
Accessibility
- Role
- group (div)
- Keyboard
- Not focusable itself; interactive children are.
- Notes
- CardTitle is a div; wrap its text in a heading (h2, h3) that fits the page outline.
Props
variant= 'default''default' | 'outline' | 'inverse'Background treatment.
Prompt for your agent
Use the UnbuiltUI Card. Call unbuilt_get_component("Card") first and follow its spec: variants, states, usage rules and accessibility.
unbuilt_get_component returns
3 variants1 state1 prop6 usage rules2 a11y notes9 tokens2 examples
Add it with shadcn
$
npx shadcn add https://unbuiltui.com/r/card.jsonTokens · 9
bg.surfacebg.raisedbg.subtlebg.inversefg.inversefg.mutedborder.subtleradius.lgradius.md