card
Card
Frames related content such as a product or an order, with header, title, description, action, image, content and footer parts.
States: Default
Parts
| Part | File | Does |
|---|---|---|
| Card | Card.vue | Groups related content, such as a product or an order, into one framed block. |
| CardAction | CardAction.vue | Holds a control placed at the end of the card header. |
| CardContent | CardContent.vue | Holds the main content of the card. |
| CardDescription | CardDescription.vue | Shows secondary text below the card title. |
| CardFooter | CardFooter.vue | Holds the closing content of the card, such as status or buttons. |
| CardHeader | CardHeader.vue | Groups the title, description and action at the top of the card. |
| CardImage | CardImage.vue | Shows a picture across the top of the card. |
| CardTitle | CardTitle.vue | Names what the card is about. |
Anatomy
<Card>
<CardImage />
<CardHeader>
<CardTitle />
<CardDescription />
<CardAction />
</CardHeader>
<CardContent />
<CardFooter />
</Card>Styling
| Part | Recipe |
|---|---|
| Card | card |
| CardAction | card-action |
| CardContent | card-content |
| CardDescription | card-description |
| CardFooter | card-footer |
| CardHeader | card-header |
| CardTitle | card-title |
Install
Writes 9 files into components/ui/card/. For agents, npx @frontic/ui docs card prints this reference as markdown; the MCP server serves the same.
- npm packages
- class-variance-authority
- reka-ui
API reference
Card Card.vue
Groups related content, such as a product or an order, into one framed block. Renders a <div>.
| Prop | Type | Default | |
|---|---|---|---|
| asChild | boolean | false | |
| as | AsTag | Component | 'div' | |
| surface | 'raised' | 'bare' | 'raised' | |
| class | ClassValue | — | |
| Data attribute | Values | |
|---|---|---|
| data-surface | 'raised' | 'bare' | |
| Recipe card | Sets | |
|---|---|---|
| base: card | 14 properties · 9 inherited | |
| surface: bare | 6 properties | |
CardAction CardAction.vue
CardContent CardContent.vue
CardDescription CardDescription.vue
CardHeader CardHeader.vue
CardImage CardImage.vue
CardTitle CardTitle.vue
Example