# usePopover API

> Auto-generated API reference for `usePopover` from @vuetify/v0 (Vuetify0).
> Source of truth: https://0.vuetifyjs.com/api/use-popover

## Related

- https://0.vuetifyjs.com/composables/system/use-popover
- https://0.vuetifyjs.com/components/disclosure/popover
- https://0.vuetifyjs.com/composables/system/use-click-outside
- https://0.vuetifyjs.com/composables/system/use-event-listener

## Functions

### createPopoverFallback

Synthesized fallback used when `usePopover()` is called without
`app.use(createPopoverPlugin())`. Returns `{ adapter: undefined }` so
resolution falls through to `V0PopoverAdapter`.

```ts
() => PopoverPluginContext
```

### usePopover

```ts
(options?: PopoverOptions) => PopoverReturn
```

### toPlacement

```ts
typeof toPlacement
```

### createPopoverContext

```ts
<_E>(_options?: PopoverPluginOptions | undefined) => ContextTrinity<_E>
```

### createPopoverPlugin

```ts
(_options?: PopoverPluginOptions | undefined) => Plugin
```

## Options

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `id` | `string \| undefined` | — | no | Auto-generated if not provided |
| `positionArea` | `MaybeRefOrGetter<string \| undefined>` | `'bottom'` | no | CSS position-area value |
| `positionTry` | `MaybeRefOrGetter<string \| undefined>` | `'most-width bottom'` | no | CSS position-try-fallbacks value |
| `isOpen` | `Ref<boolean, boolean> \| undefined` | — | no | External ref for bidirectional open state (e.g., from defineModel) |
| `openDelay` | `MaybeRefOrGetter<number> \| undefined` | `0` | no | Delay in ms before opening the popover. |
| `closeDelay` | `MaybeRefOrGetter<number> \| undefined` | `0` | no | Delay in ms before closing the popover. |
| `adapter` | `PopoverAdapter \| undefined` | — | no | Positioning engine. Resolution: per-instance `adapter`, then the `createPopoverPlugin` adapter, then `new V0PopoverAdapter()` (CSS anchor positioning, zero runtime dependency). |

## Methods

| Name | Type | Description |
|---|---|---|
| `open` | `() => void` | Open the popover (respects openDelay) |
| `close` | `() => void` | Close the popover (respects closeDelay) |
| `toggle` | `() => void` | Toggle open/close |
| `cancel` | `() => void` | Cancel any pending open or close transition |
| `attach` | `(el: MaybeRefOrGetter<HTMLElement \| null \| undefined>) => void` | Attach to a content element — wires show/hide watch + toggle event sync |
| `attachAnchor` | `(el: MaybeRefOrGetter<Element \| null \| undefined>) => void` | Register the activator/reference element with the positioning adapter |

## Properties

| Name | Type | Description |
|---|---|---|
| `isOpen` | `Ref<boolean, boolean>` | Whether the popover is open |
| `id` | `string` | Unique ID for the popover |
| `anchorStyles` | `Readonly<Ref<Record<string, string>, Record<string, string>>>` | Styles to spread on the activator element (anchor-name) |
| `contentAttrs` | `Readonly<Ref<{ id: string; popover: ""; }, { id: string; popover: ""; }>>` | Attrs to spread on the content element (id, popover) |
| `contentStyles` | `Readonly<Ref<Record<string, string>, Record<string, string>>>` | Styles to spread on the content element. Owned by the active adapter — CSS anchor declarations from `V0PopoverAdapter`, or whatever a custom engine (e.g. Floating UI) returns. Not inherently CSS-anchor styles. |
| `positionArea` | `Ref<string, string>` | Placement intent. Writable so Content can override Root. |
| `positionTry` | `Ref<string, string>` | Fallback positioning. Writable so Content can override Root. |
