# Card: Clickable variants

> Each variant gets its own hover feedback once it holds a link, and the focus ring wraps the whole card when the link is focused with the keyboard.

Example: https://hextaui.com/docs/card/examples/link-variants
Component docs: https://hextaui.com/docs/card.md

## Add this example

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

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

## Source

```tsx title="components/examples/card/link-variants.tsx"
import { IconArrowUpRight } from "@tabler/icons-react"

import {
  Card,
  CardDescription,
  CardHeader,
  CardLink,
  CardTitle,
} from "@/components/ui/card"

export function CardLinkVariants() {
  return (
    <div className="grid w-full gap-4 sm:grid-cols-3">
      <Card size="sm">
        <CardHeader>
          <CardTitle>
            <CardLink href="#">
              Default <IconArrowUpRight className="inline size-4" />
            </CardLink>
          </CardTitle>
          <CardDescription>The shadow lifts on hover.</CardDescription>
        </CardHeader>
      </Card>
      <Card variant="outline" size="sm">
        <CardHeader>
          <CardTitle>
            <CardLink href="#">
              Outline <IconArrowUpRight className="inline size-4" />
            </CardLink>
          </CardTitle>
          <CardDescription>A soft fill on hover.</CardDescription>
        </CardHeader>
      </Card>
      <Card variant="muted" size="sm">
        <CardHeader>
          <CardTitle>
            <CardLink href="#">
              Muted <IconArrowUpRight className="inline size-4" />
            </CardLink>
          </CardTitle>
          <CardDescription>The fill deepens on hover.</CardDescription>
        </CardHeader>
      </Card>
    </div>
  )
}
```

## 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)
- [Borders](https://hextaui.com/docs/card/examples/borders.md)
- [Nested](https://hextaui.com/docs/card/examples/nested.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)
