Skip to main content
Vuetify0 Logo
Theme
Mode
Palettes
Accessibility
Vuetify One
Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

usePopover API

Native popover API with a pluggable positioning adapter. Defaults to CSS-anchor positioning; swap in FloatingUIPopoverAdapter (or any PopoverAdapter) per instance or app-wide via createPopoverPlugin.

Explore these related pages for additional context and usage patterns.

PageCategory
usePopoverSystem
PopoverDisclosure
useClickOutsideSystem
useEventListenerSystem

Functions

createPopoverFallback

() => PopoverPluginContext

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

usePopover

(options?: PopoverOptions) => PopoverReturn

toPlacement

typeof toPlacement

createPopoverContext

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

createPopoverPlugin

(_options?: PopoverPluginOptions | undefined) => Plugin

Options

id

string | undefined

Auto-generated if not provided

positionArea

MaybeRefOrGetter<string | undefined>

CSS position-area value

Default: 'bottom'

positionTry

MaybeRefOrGetter<string | undefined>

CSS position-try-fallbacks value

Default: 'most-width bottom'

isOpen

Ref<boolean, boolean> | undefined

External ref for bidirectional open state (e.g., from defineModel)

openDelay

MaybeRefOrGetter<number> | undefined

Delay in ms before opening the popover.

Default: 0

closeDelay

MaybeRefOrGetter<number> | undefined

Delay in ms before closing the popover.

Default: 0

adapter

PopoverAdapter | undefined

Positioning engine. Resolution: per-instance adapter, then the createPopoverPlugin adapter, then new V0PopoverAdapter() (CSS anchor positioning, zero runtime dependency).

Properties

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.

Methods

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

Was this page helpful?

© 2016-1970 Vuetify, LLC
Services
Ctrl+/