OOUI/Windows/Dialogs

The OOjs UI library contains three types of dialogs (Dialog, ProcessDialog, and MessageDialog), which render a dialog box that users can view and interact with. Each dialog is configured with the controls required—either for responding to a message or completing a process—and all configuration is handled with a common API.

Note that the Dialog (and ProcessDialog) classes themselves are not instantiated directly. By extending these classes, developers control the look and functionality of the entire window rather than injecting bits and pieces of information into it. Only MessageDialogs, which are very generic, are instantiated directly.

The Dialog class serves as the base class for the other types of dialogs. Unless extended to include controls, the rendered dialog box is a simple window that users can close by hitting the ‘Esc’ key. Every dialog provides an   DOM element that can be used for elements (e.g., menus) that extend outside of the dialog. See LookupElement for an example.

The following is an example of a basic Dialog window.



For more information about Dialog windows, please see the code-level documentation.