OOUI/Widgets/Popups

A   is a container for content. Popups are overlaid and positioned absolutely. The width, height, and padding can be customized using configuration options. By default, each has an ‘anchor,’ which is an arrow-like protrusion that points toward the popup’s origin.

Create a popup and add content using the  config:



Add a close button and label to the top of the popup with the  and   options:



Specify whether the popup should have an anchor or not with the  option:



Align the popup with the  option. Alignment can be set to,  ,  ,  , or.

Set a container and container padding with the  and   options:

Automatically close the popup when it loses focus with the  (and, optionally,  ) options:

You can also achieve this effect using the built-in  class.

For a complete list of supported methods and configuration options, please see the code-level documentation.