CardHeader, CardContent, and CardFooter — that handle spacing and layout so you can focus on content.
Basic Usage
Structure
Cards follow a header → content → footer pattern. Each section is optional — use only what you need.CardHeader is a grid that pairs a CardTitle with an optional CardDescription. CardContent provides horizontal padding for your main content. CardFooter renders as a flex row, naturally aligning action buttons side by side.
Simple Cards
For lightweight use cases, you can skip the sub-components entirely and usecss_class to add padding:
Card Grid
Cards work naturally withGrid for dashboard-style layouts:
API Reference
Card Parameters
Additional Tailwind CSS classes. The card renders as a
div with border, shadow, and rounded corners.CardHeader Parameters
Additional Tailwind CSS classes. Renders as a grid with automatic spacing for title and description.
CardContent Parameters
Additional Tailwind CSS classes. Provides horizontal padding (
px-4) for the main body area.CardFooter Parameters
Additional Tailwind CSS classes. Renders as a flex row for action buttons.
Protocol Reference
Card
CardHeader
CardTitle
CardDescription
CardContent
CardFooter