The ui-popup element creates a fully accessible popup with a configurable trigger and overlay
element. Both the trigger and overlay have to be added as child elements to the ui-popup element
and marked using the data-part="trigger"/data-part="overlay" attribute respectively.
This is similar to using the slot attribute, however without depending on shadow DOM:
This is some arbitrary popup content.
The ui-popup element will create and manage the required behaviors for the popup functionality:
FocusBehavior for managing the popup overlay focusPositionBehavior for managing the popup overlay positionOverlayBehavior and OverlayTriggerBehavior
for managing the interaction between the overlay and triggerThe ui-popup element has the following properties / configuration options:
overlayClasses: an array of custom class names to be added to the overlaytriggerClasses: an array of custom class names to be added to the triggerconfig: an object which allows to override the configurations of the popup's behavior instancesThe ui-popup element does NOT trap the focus in the overlay by default. This is in
line with the expected focus behavior of menu popups, listbox popups and similar ui elements, which capture the
focus (set the focus to an initial element inside the popup) but allow a user to tab out of the popup and move on
to the next element in the tab sequence. However, this behavior can be customized through the config
property.
This example shows a popup using plain HTML and no data-binding or templating.
This is some arbitrary popup content.