Settings summary
Group an account setting, its explanation, and an edit action in one surface.
Components / Display
A composable surface for related content and actions.
Card variant
Card variant
Card variant
Group an account setting, its explanation, and an edit action in one surface.
Give a small set of related figures a clear title and supporting context.
<script setup lang="ts">
import Card from './components/ui/card/Card.vue'
import CardHeader from './components/ui/card/CardHeader.vue'
import CardTitle from './components/ui/card/CardTitle.vue'
import CardDescription from './components/ui/card/CardDescription.vue'
import CardContent from './components/ui/card/CardContent.vue'
</script>
<template>
<Card as="article">
<CardHeader>
<CardTitle>Workspace</CardTitle>
<CardDescription>Updated just now</CardDescription>
</CardHeader>
<CardContent>Your content</CardContent>
</Card>
</template>Put the action in the footer so the content remains easy to scan.
<script setup lang="ts">
import Button from './components/ui/button/Button.vue'
import Card from './components/ui/card/Card.vue'
import CardContent from './components/ui/card/CardContent.vue'
import CardDescription from './components/ui/card/CardDescription.vue'
import CardFooter from './components/ui/card/CardFooter.vue'
import CardHeader from './components/ui/card/CardHeader.vue'
import CardTitle from './components/ui/card/CardTitle.vue'
</script>
<template>
<Card as="section" variant="outline">
<CardHeader><CardTitle as="h2">Email notifications</CardTitle><CardDescription>Choose which updates reach your inbox.</CardDescription></CardHeader>
<CardContent>Weekly summaries are enabled.</CardContent>
<CardFooter><Button variant="outline">Edit preferences</Button></CardFooter>
</Card>
</template>A smaller card can show a single measure without another nested container.
<script setup lang="ts">
import Card from './components/ui/card/Card.vue'
import CardContent from './components/ui/card/CardContent.vue'
import CardDescription from './components/ui/card/CardDescription.vue'
import CardHeader from './components/ui/card/CardHeader.vue'
import CardTitle from './components/ui/card/CardTitle.vue'
</script>
<template>
<Card as="article" size="sm" variant="muted">
<CardHeader><CardTitle as="h2">Open issues</CardTitle><CardDescription>Across active projects</CardDescription></CardHeader>
<CardContent><strong>12</strong></CardContent>
</Card>
</template>The most useful props, models, slots, events, and methods for this component.
| Name | Type | Default or requirement |
|---|---|---|
as | div | section | article | div |
variant | default | outline | muted | default |
size | sm | md | lg | md |
CardTitle as | h2 ... h6 | h3 |
Compose CardHeader, CardTitle, CardDescription, CardContent, and CardFooter as needed.