---
title: Popover
description: Displays rich content in a portal, triggered by a button.

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

<ComponentPreview name="popover-demo">

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

```

</ComponentPreview>

## Installation

<ComponentInstallation>

<Step>

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

  <ComponentSourceTabs>

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

    ```

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

    ```

  </ComponentSourceTabs>

</Step>

</ComponentInstallation>

## Usage

```tsx
import {
  Popover,
  PopoverContent,
  PopoverPortal,
  PopoverTrigger,
} from "@/components/ui/popover"
```

```tsx
<Popover>
  <PopoverTrigger />
  <PopoverPortal>
    <PopoverContent />
  </PopoverPortal>
</Popover>
```
