# Popover

> Source: https://design.nanatec.co.ke/components/popover/
> A panel anchored to a trigger, opened and closed by the app.

Popover is a Svelte component. In the web components an anchored panel is
[`nana-popup`](/components/popup/).

## Installation

```bash
npx @nana-tec/ui add popover --framework svelte
```

Lands in `src/lib/components/ui/popover/` as `NanaPopover.svelte`, styled with Tailwind
classes that resolve to the design tokens. Requires Tailwind v4.

## Usage

```svelte
<script lang="ts">
  import { NanaPopover } from '$lib/components/ui/popover';

  let open = $state(false);
</script>

<NanaPopover bind:open title="Filters" placement="bottom-start">
  {#snippet trigger({ props })}
    <button {...props}>Filters</button>
  {/snippet}
  ...
</NanaPopover>
```

Spread `props` onto the element that opens it. Focus moves into the popover when it
opens; Escape closes it and returns focus to the trigger, and a press outside closes it.
`children` receives `close` for buttons inside.

## API
