Skip to content

VPopover

Props

NameTypeDescription
alternatebooleanSets the color-scheme to alternate (dark/light)
anchorHTMLElementSets the Popover's anchor element. Prefer using the anchor slot if possible.
arrowbooleanAdds a small triangle to indicate the trigger element.
dismiss-button-aria-labelstringOverrides the default "Close" aria-label of Dismiss button when manual mode is enabled.
layoutEnum:
condensed
default
Can be used to enable a condensed layout with smaller paddings and gaps.
manualbooleanSets the Popover to manual mode, disabling light-dismiss (clicking outside) and displaying a close button.
offsetnumberSets the offset between popover and the anchor element.
openbooleanSets the open state of the Popover
placementEnum:
top
bottom
left
right
top-start
top-end
bottom-start
bottom-end
left-end
left-start
right-end
right-start
Controls the position of the Popover, relative to its anchor element.

Events

NameEvent TypeDescription
blurFocusEventFires when the element loses focus.
clickMouseEventFires when a pointing device button (such as a mouse's primary mouse button) is both pressed and released while the pointer is located inside the element.
closeCustomEventFired when the popover closes.
focusFocusEventFires when the element receives focus.
inputEventFires when the value of an element has been changed.
keydownKeyboardEventFires when a key is pressed.
keyupKeyboardEventFires when a key is released.
openCustomEventFired when the popover opens.

Slots

NameDescription
anchorSlot for the trigger element.
defaultDefault slot for the popover content.
footerUse the footer slot in order to add action buttons or other contents to the bottom of the dialog.

Methods

NameTypeDescription
hide() => void
show() => Promise<void>
toggle() => void
updatePosition() => Promise<void>Updates the position of the popover