---
title: Hover Card
description: For sighted users to preview content available behind a link.

link:
  doc: https://kobalte.dev/docs/core/components/hover-card
  api: https://kobalte.dev/docs/core/components/hover-card#api-reference
---

<ComponentPreview name="hover-card-demo">

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

```

</ComponentPreview>

## Installation

<ComponentInstallation>

<Step>

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

  <ComponentSourceTabs>

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

    ```

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

    ```

  </ComponentSourceTabs>

</Step>

</ComponentInstallation>

## Usage

```tsx
import {
  HoverCard,
  HoverCardContent,
  HoverCardPortal,
  HoverCardTrigger,
} from "@/components/ui/hover-card"
```

```tsx
<HoverCard>
  <HoverCardTrigger />
  <HoverCardPortal>
    <HoverCardContent />
  </HoverCardPortal>
</HoverCard>
```
