Components
Card
Container for grouping related content with optional header, body, and footer sections.
Import
Usage
Card Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'elevated' | 'flat' | 'outlined' | 'elevated' | Visual style |
hoverable | boolean | false | Add hover lift effect |
padding | 'none' | 'sm' | 'md' | 'lg' | — | Override default body padding |
className | string | — | Additional CSS classes |
...rest | HTMLAttributes<HTMLDivElement> | — | All native div attributes |
CardHeader / CardBody / CardFooter
Each subcomponent accepts className and children. They handle spacing and borders automatically.
Accessibility
- Renders as a
<div>— not inherently interactive - When
hoverableandonClickare used, addrole="button"andtabIndex={0}for keyboard access, or use an anchor tag - Use proper heading hierarchy inside cards