Skip to content
On this page

NcPopover

Props

Prop nameDescriptionTypeValuesDefault
popoverBaseClassstring-''
focusTrapEnable popover focus trapboolean-true
setReturnFocusSet element to return focus to after focus trap deactivationimport('focus-trap').Options['setReturnFocus']-undefined

Events

Event namePropertiesDescription
after-show
after-hideTriggered after the tooltip was visually hidden.

Slots

NameDescriptionBindings
trigger
default

General description

This component is just a wrapper for the floating-vue plugin by Akryum, please refer to this documentation for customization: https://github.com/Akryum/floating-vue

This components has two slots:

  • 'trigger' which can be any html element and it will trigger the popover this slot is optional since you can toggle the popover also by updating the open prop on this component;

  • a default slot that is for the content of the popover.

Examples

With a <button> as a trigger:

loading...

Without focus trap:

The focus-trap emits an error when used in a non-focusable element tree.

The prop :focus-trap="false" help to prevent it when the default behavior is not relevant.

loading...