# Empty: In a card

> Use `size="sm"` with the muted variant to fill a card that has no data yet.

Example: https://hextaui.com/docs/empty/examples/in-card
Component docs: https://hextaui.com/docs/empty.md

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/empty-in-card.json
```

This adds `components/examples/empty/in-card.tsx` with the Empty component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/empty/in-card.tsx"
import { IconChartBar } from "@tabler/icons-react"

import { Button } from "@/components/ui/button"
import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"
import {
  Empty,
  EmptyContent,
  EmptyDescription,
  EmptyHeader,
  EmptyMedia,
  EmptyTitle,
} from "@/components/ui/empty"

export function EmptyInCard() {
  return (
    <Card className="w-full max-w-sm">
      <CardHeader>
        <CardTitle>Revenue</CardTitle>
        <CardDescription>Last 30 days</CardDescription>
      </CardHeader>
      <CardContent>
        <Empty variant="muted" size="sm">
          <EmptyHeader>
            <EmptyMedia variant="icon">
              <IconChartBar />
            </EmptyMedia>
            <EmptyTitle>No data yet</EmptyTitle>
            <EmptyDescription>
              Charts appear after your first sale.
            </EmptyDescription>
          </EmptyHeader>
          <EmptyContent>
            <Button variant="outline" size="sm">
              Connect a store
            </Button>
          </EmptyContent>
        </Empty>
      </CardContent>
    </Card>
  )
}
```

## Props in this example

### Empty

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"default" \| "outline" \| "muted"` | `"default"` |  |
| `size` | `"default" \| "sm"` | `"default"` | sm tightens padding, gaps, the icon tile and the title. |

### EmptyMedia

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"default" \| "icon" \| "stack"` | `"default"` | icon puts an icon in a muted tile. stack raises the tile over two fanned cards that spread when the empty state is hovered. Both hide the media from assistive tech. |

## More Empty examples

- [Entrance](https://hextaui.com/docs/empty/examples/transition.md)
- [Outline](https://hextaui.com/docs/empty/examples/outline.md)
- [Muted](https://hextaui.com/docs/empty/examples/muted.md)
- [Small](https://hextaui.com/docs/empty/examples/small.md)
- [Avatar](https://hextaui.com/docs/empty/examples/avatar.md)
- [Avatar group](https://hextaui.com/docs/empty/examples/avatar-group.md)
- [Image](https://hextaui.com/docs/empty/examples/image.md)
- [No search results](https://hextaui.com/docs/empty/examples/search-results.md)
- [In a table](https://hextaui.com/docs/empty/examples/in-table.md)
- [In a popover](https://hextaui.com/docs/empty/examples/in-popover.md)
- [In a command list](https://hextaui.com/docs/empty/examples/in-command.md)
- [Heading level](https://hextaui.com/docs/empty/examples/heading.md)
- [Long content](https://hextaui.com/docs/empty/examples/long-content.md)
- [Right to left](https://hextaui.com/docs/empty/examples/rtl.md)
