Card
A layout primitive for grouping content into a visually distinct surface. All visual properties use design tokens so cards respect the consumer’s theme.
Add via CLI
Section titled “Add via CLI”npx @a2ra/cli add cardWithout border
Section titled “Without border”Example JSON
Section titled “Example JSON”{ "type": "Card", "props": { "padding": "lg", "shadow": "md" }, "children": [ { "type": "Text", "props": { "as": "h3", "weight": "semibold" }, "children": "Usage this month" }, { "type": "Text", "props": { "size": "2xl", "weight": "bold" }, "children": "12,483" } ]}| Prop | Type | Description |
|---|---|---|
padding | nonesmmd defaultlg | Internal padding |
shadow | nonesm defaultmdlg | Drop shadow depth |
radius | nonesmmd defaultlg | Border radius |
border | true defaultfalse | Show a border |
children | node[] | Content rendered inside the card |
Cardis a plain<div>with no semantic role. Wrap with a parent layout node if landmark semantics are needed.border: falsecombined with a shadow is the standard “floating card” look.- Nest
FormorFlexinsideCardto build structured layouts.