# Card: Nested

> A card inside CardContent derives its radius from the parent’s radius minus the spacing, so the corners stay concentric.

Example: https://hextaui.com/docs/card/examples/nested
Component docs: https://hextaui.com/docs/card.md

## Add this example

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

This adds `components/examples/card/nested.tsx` with the Card component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/card/nested.tsx"
import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardLink,
  CardTitle,
} from "@/components/ui/card"

export function CardNested() {
  return (
    <Card className="w-full max-w-sm">
      <CardHeader>
        <CardTitle>Usage</CardTitle>
        <CardDescription>This billing period.</CardDescription>
      </CardHeader>
      <CardContent>
        <Card variant="muted" size="sm">
          <CardHeader>
            <CardTitle>Build minutes</CardTitle>
            <CardDescription>1,240 of 3,000 used</CardDescription>
          </CardHeader>
        </Card>
        <Card variant="outline" size="sm">
          <CardHeader>
            <CardTitle>
              <CardLink href="#">Bandwidth</CardLink>
            </CardTitle>
            <CardDescription>84 GB of 100 GB used</CardDescription>
          </CardHeader>
        </Card>
      </CardContent>
    </Card>
  )
}
```

## Props in this example

### Card

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"default" \| "outline" \| "muted"` | `"default"` |  |
| `size` | `"default" \| "sm" \| "flush"` | `"default"` | Scales spacing, radius and title size together. |

### CardLink

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `href` | `string` | – |  |

## More Card examples

- [Variants](https://hextaui.com/docs/card/examples/variants.md)
- [Sizes](https://hextaui.com/docs/card/examples/sizes.md)
- [Media](https://hextaui.com/docs/card/examples/media.md)
- [Clickable card](https://hextaui.com/docs/card/examples/link.md)
- [Clickable variants](https://hextaui.com/docs/card/examples/link-variants.md)
- [Borders](https://hextaui.com/docs/card/examples/borders.md)
- [Long content](https://hextaui.com/docs/card/examples/long-content.md)
- [Semantics](https://hextaui.com/docs/card/examples/semantics.md)
- [Right to left](https://hextaui.com/docs/card/examples/rtl.md)
