Components
Card
A container component with optional header, content, and footer sections. Use variants to control visual prominence.
Basic usage
Compose with CardHeader, CardContent, and CardFooter for structured layouts.
Project settings
Manage your project configuration.
Content goes here.
Variants
Four variants for different visual weights.
Default
Elevated
Outline
Ghost
Padding
sm
md
lg
none
Example: Stats card
Total Revenue
+12%$45,231
Compared to $40,385 last month
Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'default' | 'elevated' | 'outline' | 'ghost' | 'default' | Visual style of the card. |
padding | 'none' | 'sm' | 'md' | 'lg' | 'md' | Internal padding size. |
className | string | — | Additional Tailwind classes to merge. |
...rest | HTMLAttributes<HTMLDivElement> | — | All native div props are forwarded. |
Accessibility
- Card is a generic
div— addroleif needed for landmark navigation. - Use semantic headings (h2, h3) inside
CardTitlewhen appropriate.