# Popover

> Floating content anchored to a trigger.

- Category: [Overlays](https://tarve.dev/docs.md#overlays)
- Import: `import { Popover } from "@tarve/core";`
- Props type: `PopoverProps`
- Source: [packages/core/src/popups.ts:243](https://github.com/omarcosr/tarve/blob/main/packages/core/src/popups.ts#L243)

## Usage

```tsx title="Popover.tsx"
import { Button, Popover, Text } from "@tarve/core";

let open = true;

<Popover
  id="filters"
  open={open}
  trigger={<Button variant="outline">Filters</Button>}
  onOpenChange={(next) => {
    open = next;
  }}
>
  <Text>Filter options go here.</Text>
</Popover>
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `id` (required) | `string` | — |  |
| `open` (required) | `boolean` | — |  |
| `trigger` (required) | `Child` | — |  |
| `contentStyle` | `Style` | — |  |
| `disabled` | `boolean` | `false` |  |
| `label` | `string` | — |  |
| `onOpenChange` | `(open: boolean) => void` | — |  |
| `side` | `PopupSide` | `"bottom"` |  |
| `triggerStyle` | `Style` | — |  |

## Common props

Shared by every component (descriptions: https://tarve.dev/docs.md#common-props): `children`, `class`, `className`, `highlight`, `key`, `motionFrom`, `onHighlight`, `onPaste`, `onPointerLeave`, `onPointerMove`, `onSize`, `onTransitionEnd`, `rovingGroup`, `style`.

## Types

```ts title="PopupSide"
type PopupSide = "top" | "right" | "bottom" | "left";
```

Previous: [Drawer](https://tarve.dev/docs/components/Drawer.md) · Next: [Flyout](https://tarve.dev/docs/components/Flyout.md)

---

Tarve v0.13.8 · HTML version: https://tarve.dev/docs/components/Popover · Index for agents: https://tarve.dev/llms.txt
