Introduction
Accordion
Badge
Button
Card
Checkbox
Counter
Dialog
Dropdown
Input
Select
Switch
Tabs
Toast
Tooltip
Controlled Input
Field Arrays
Submit
Validation

Displays a card with header, content, and footer.

Card Title

Card Description

Card Content

Card Footer

1<Card>...</Card>

#Installation

1bunx barefoot add card

#Usage

1import {2  Card,3  CardHeader,4  CardTitle,5  CardDescription,6  CardContent,7  CardFooter,8} from '@/components/ui/card'910export default function Page() {11  return (12    <Card>13      <CardHeader>14        <CardTitle>Card Title</CardTitle>15        <CardDescription>Card Description</CardDescription>16      </CardHeader>17      <CardContent>18        <p>Card Content</p>19      </CardContent>20      <CardFooter>21        <p>Card Footer</p>22      </CardFooter>23    </Card>24  )25}

#Examples

#Simple

Notifications

You have 3 unread messages.

Your notifications will appear here.

1<Card>2  <CardHeader>3    <CardTitle>Notifications</CardTitle>4    <CardDescription>You have 3 unread messages.</CardDescription>5  </CardHeader>6  <CardContent>7    <p>Your notifications will appear here.</p>8  </CardContent>9</Card>

Create project

Deploy your new project in one-click.

Configure your project settings here.

1<Card>2  <CardHeader>3    <CardTitle>Create project</CardTitle>4    <CardDescription>Deploy your new project in one-click.</CardDescription>5  </CardHeader>6  <CardContent>7    <p>Configure your project settings here.</p>8  </CardContent>9  <CardFooter>10    <Button>Create</Button>11  </CardFooter>12</Card>

#Minimal

A simple card with only content.

1<Card>2  <CardContent class="pt-6">3    <p>A simple card with only content.</p>4  </CardContent>5</Card>

#API Reference

Card

PropTypeDefaultDescription
childrenReactNode-The content of the card (typically CardHeader, CardContent, CardFooter).
classstring-Additional CSS classes to apply.

CardHeader

PropTypeDefaultDescription
childrenReactNode-The content of the header (typically CardTitle, CardDescription).
classstring-Additional CSS classes to apply.

CardTitle

PropTypeDefaultDescription
childrenReactNode-The title text.
classstring-Additional CSS classes to apply.

CardDescription

PropTypeDefaultDescription
childrenReactNode-The description text.
classstring-Additional CSS classes to apply.

CardContent

PropTypeDefaultDescription
childrenReactNode-The main content of the card.
classstring-Additional CSS classes to apply.

CardFooter

PropTypeDefaultDescription
childrenReactNode-The footer content (typically actions like buttons).
classstring-Additional CSS classes to apply.