# Card

> Surface card with header, body, and footer slots.

Registry name: `card`. HTML docs: https://ui.anuragroy.dev/component/card.

## Install

```bash
npx shadcn@latest add https://ui.anuragroy.dev/r/card.json
```

If the website is down: `npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/card.json`.

Registry JSON: https://ui.anuragroy.dev/r/card.json (GitHub: https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/card.json).

## Import

Import paths follow the consumer `components.json` aliases. After a default install:

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

## Usage

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

export function Example() {
  return (
    <Card>
      <CardHeader>
        <CardTitle>Card title</CardTitle>
        <CardDescription>Soft surface card with large radius.</CardDescription>
      </CardHeader>
      <CardContent>Use the full card composition.</CardContent>
      <CardFooter>
        <Button size="sm">Action</Button>
      </CardFooter>
    </Card>
  )
}
```

## API

### Card

Styled `div` surface. Compose with Header / Content / Footer.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | string | — |  |

## See also

- [HTML page](https://ui.anuragroy.dev/component/card): Preview and the same docs in the site chrome.
- [Registry item](https://ui.anuragroy.dev/r/card.json): Source files and dependencies.
- [Catalog](https://ui.anuragroy.dev/component): All components.
- [llms.txt](https://ui.anuragroy.dev/llms.txt): Agent index for this library.
