Displays a card with header, content and footer
Card and its sections render div elements and accept standard div attributes. Compose a header, title, description, action, content and footer as needed; squircle changes the outer corners. Use it to group related content, and Badge for a compact status label.
Browser Support
Baseline Widely available2 featuresDetails
Feature
Baseline
Your browser
:has()
Changes the header grid when an action exists
Your browser:
Container queries (size)
Creates a container for header content
Your browser:
Preview
Create Project
Deploy a new project in one click
Your new project will be created with a configured environment
Installation
Usage
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/components/ui/card"
export function MyCard() {
return (
<Card>
<CardHeader>
<CardTitle>Title</CardTitle>
<CardDescription>Description</CardDescription>
</CardHeader>
<CardContent>
<p>Card content</p>
</CardContent>
<CardFooter>
<p>Footer</p>
</CardFooter>
</Card>
)
}Squircle
iOS-style squircle corners using CSS corner-shape: squircle.
Regular
border-radius
Squircle
corner-shape
<Card squircle>
<CardHeader>
<CardTitle>Squircle Card</CardTitle>
</CardHeader>
</Card>Components
| Component | Description |
|---|---|
| Card | Card container |
| CardHeader | Card header section |
| CardTitle | Card title text |
| CardDescription | Card description text |
| CardContent | Main content area |
| CardFooter | Card footer section |
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| squircle | boolean | false | Apply iOS-style squircle corners (Chrome 139+) |