Overview
TheCard component provides a flexible container with multiple sub-components for building structured content layouts. Includes CardHeader, CardTitle, CardDescription, CardContent, and CardFooter.
Import
Basic Usage
Sub-Components
Card
The root container component.CardHeader
Container for the card’s header section.CardTitle
Heading for the card (renders as<h3>).
CardDescription
Subheading or description text (renders as<p>).
CardContent
Main content area of the card.CardFooter
Footer section for actions or additional information.Props
All Card sub-components extend their respective HTML element attributes:string
Additional CSS classes for the Card container.
string
Additional CSS classes for CardHeader.
string
Additional CSS classes for CardTitle.
string
Additional CSS classes for CardDescription.
string
Additional CSS classes for CardContent.
Additional CSS classes for CardFooter.
Examples
Complete Card
Simple Card
Custom Styling
Component Definition
Location:packages/gadget-ui/src/components/card.tsx
All Card sub-components use forwardRef to support ref forwarding to their underlying HTML elements.