Shadcn UI Components
Card
Cards are used to group related content and actions about a single subject. They provide a flexible container with header, content, and footer sections.
Card Examples
Basic Card
A simple card with header and content.
Cards are used to group related content and actions about a single subject.
Card with Footer
This card includes a footer with actions.
The footer typically contains action buttons or additional information.
Create Project
Deploy your new project in one-click.
Notifications
You have 3 unread messages.
Push Notifications
Send notifications to device.
Installation
# The component is already installed at:
# src/components/ui/shadcn/card.tsx
Usage
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from '@/components/ui/shadcn/card'
export function CardDemo() {
return (
<Card>
<CardHeader>
<CardTitle>Card Title</CardTitle>
<CardDescription>Card Description</CardDescription>
</CardHeader>
<CardContent>
<p>Card Content</p>
</CardContent>
<CardFooter>
<p>Card Footer</p>
</CardFooter>
</Card>
)
}
Components
| Component | Description |
|---|---|
| Card | The main container component |
| CardHeader | Contains the title and description |
| CardTitle | The title of the card |
| CardDescription | A secondary description text |
| CardContent | The main content area |
| CardFooter | Contains actions or additional info |