

<InteractiveDemo
  name="popover"
  engine="source"
  controls="[
  	{
  		type: &#x22;enum&#x22;,
  		name: &#x22;placement&#x22;,
  		options: [&#x22;bottom&#x22;, &#x22;top&#x22;, &#x22;left&#x22;, &#x22;right&#x22;],
  		defaultValue: &#x22;bottom&#x22;,
  	},
  ]"
/>

## Installation [#installation]

<CodeBlockTabs defaultValue="npm">
  <CodeBlockTabsList>
    <CodeBlockTabsTrigger value="npm">
      npm
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="pnpm">
      pnpm
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="yarn">
      yarn
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="bun">
      bun
    </CodeBlockTabsTrigger>
  </CodeBlockTabsList>

  <CodeBlockTab value="npm">
    ```bash
    npx shadcn@latest add @dotui/popover
    ```
  </CodeBlockTab>

  <CodeBlockTab value="pnpm">
    ```bash
    pnpm dlx shadcn@latest add @dotui/popover
    ```
  </CodeBlockTab>

  <CodeBlockTab value="yarn">
    ```bash
    yarn dlx shadcn@latest add @dotui/popover
    ```
  </CodeBlockTab>

  <CodeBlockTab value="bun">
    ```bash
    bun x shadcn@latest add @dotui/popover
    ```
  </CodeBlockTab>
</CodeBlockTabs>

## Usage [#usage]

Use popovers to display rich content in a floating container that appears above other content.

```tsx
import { Button } from "@/components/ui/button";
import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";
import { Popover } from "@/components/ui/popover";
```

```tsx
<Dialog>
	<Button>Open Popover</Button>
	<Popover>
		<DialogContent>
			<DialogTitle>Popover Title</DialogTitle>
			<p>Popover content</p>
		</DialogContent>
	</Popover>
</Dialog>
```

## Examples [#examples]

<Examples>
  <Example name="popover/demos/basic" />
</Examples>

## API Reference [#api-reference]

<Reference name="popover" />
