Overview
The Card component is a versatile container for grouping related content. It provides a clean, elevated surface with consistent padding and styling.Basic Usage
Variants
- Default
- Outlined
- Elevated
- Flat
Card Structure
With Header and Footer
Interactive Cards
Hoverable Card
Clickable Card
Padding Options
Props
Card Props
string
default:"default"
Visual style:
default, outlined, elevated, or flatstring
default:"md"
Internal padding:
none, sm, md, or lgboolean
default:"false"
Whether to show elevation effect on hover
boolean
default:"false"
Makes the entire card clickable with hover effects
function
Click handler when card is clickable:
() => voidReactNode
required
The content to display inside the card
string
Additional CSS class names to apply
CardHeader Props
ReactNode
required
Header content (typically title and subtitle)
ReactNode
Action element to display in the header (e.g., icon button)
CardContent Props
ReactNode
required
Main card content
CardFooter Props
ReactNode
required
Footer content (typically actions or metadata)
string
default:"right"
Alignment of footer content:
left, center, or rightTypeScript Interfaces
Layout Examples
Card Grid
Profile Card
Accessibility
- Uses semantic HTML with proper heading hierarchy
- Clickable cards include proper role and keyboard support
- Maintains focus indicators for keyboard navigation
- Screen reader compatible with descriptive content