The ui5-dialog component is used to temporarily display some information in a
size-limited window in front of the regular app screen.
It is used to prompt the user for an action or a confirmation.
The ui5-dialog interrupts the current app processing as it is the only focused UI element and
the main screen is dimmed/blocked.
The dialog combines concepts known from other technologies where the windows have
names such as dialog box, dialog window, pop-up, pop-up window, alert box, or message box.
The ui5-dialog is modal, which means that a user action is required before it is possible to return to the parent window.
To open multiple dialogs, each dialog element should be separate in the markup. This will ensure the correct modal behavior. Avoid nesting dialogs within each other.
The content of the ui5-dialog is fully customizable.
A ui5-dialog consists of a header, content, and a footer for action buttons.
The ui5-dialog is usually displayed at the center of the screen.
Its position can be changed by the user. To enable this, you need to set the property draggable accordingly.
When the ui5-dialog has the draggable property set to true and the header is focused, the user can move the dialog
with the following keyboard shortcuts:
[Up] or [Down] arrow keys - Move the dialog up/down.
[Left] or [Right] arrow keys - Move the dialog left/right.
When the ui5-dialog has the resizable property set to true and the header is focused, the user can change the size of the dialog
with the following keyboard shortcuts:
[Shift] + [Up] or [Down] - Decrease/Increase the height of the dialog.
[Shift] + [Left] or [Right] - Decrease/Increase the width of the dialog.
Determines whether the component is draggable. If this property is set to true, the Dialog will be draggable by its header. Note: The component can be draggable only in desktop mode. Note: This property overrides the default HTML "draggable" attribute native behavior. When "draggable" is set to true, the native browser "draggable" behavior is prevented and only the Dialog custom logic ("draggable by its header") works.
Configures the component to be resizable. If this property is set to true, the Dialog will have a resize handle in its bottom right corner in LTR languages. In RTL languages, the resize handle will be placed in the bottom left corner. Note: The component can be resizable only in desktop mode. Note: Upon resizing, externally defined height and width styling will be ignored.
Defines the state of the Dialog. Note: If "Negative" and "Critical" states is set, it will change the accessibility role to "alertdialog", if the accessibleRole property is set to "Dialog".
Defines the ID of the HTML Element, which will get the initial focus. Note: If an element with autofocus attribute is added inside the component, initialFocus won't take effect.
Defines the header HTML Element. Note: When a ui5-bar is used in the header, you should remove the default dialog's paddings. Note: If header slot is provided, the labelling of the dialog is a responsibility of the application developer. accessibleName should be used.