Skip to main content

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

Card Structure

Interactive Cards

Hoverable Card

Clickable Card

Padding Options

Props

Card Props

string
default:"default"
Visual style: default, outlined, elevated, or flat
string
default:"md"
Internal padding: none, sm, md, or lg
boolean
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: () => void
ReactNode
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 right

TypeScript Interfaces

Layout Examples

Card Grid

Profile Card

Use the hoverable prop for cards in a grid to provide visual feedback on interaction.

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