---
title: Card
description: Displays a card with header, content, and footer.
---

<ComponentPreview name="card-demo">

```tsx file=<rootDir>/apps/docs/src/registry/examples/card-demo.tsx

```

</ComponentPreview>

## Installation

<ComponentInstallation>

<Step>

<StepItem>Copy and paste the following code into your project:</StepItem>

  <ComponentSourceTabs>

    ```tsx title="components/ui/card" file=<rootDir>/apps/docs/src/registry/ui/card.tsx

    ```

    ```tsx title="components/ui/card" file=<rootDir>/apps/unocss-playground/src/registry/ui/card.tsx

    ```

  </ComponentSourceTabs>

</Step>

</ComponentInstallation>

## Usage

```tsx
import {
  Card,
  CardContent,
  CardDescription,
  CardFooter,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"
```

```tsx
<Card>
  <CardHeader>
    <CardTitle />
    <CardDescription />
  </CardHeader>
  <CardContent />
  <CardFooter />
</Card>
```
