Dialog API
Properties
| Name | Type | Default | Description |
|---|---|---|---|
headline | string | — | Title displayed in the dialog header. |
no-keys | boolean | false | Disables the Escape key so the dialog cannot be closed with it. |
no-close | boolean | false | Disables all close interactions (X button, backdrop click, Escape key). |
local | boolean | false | Opens the dialog inside its parent container instead of overlaying the full page. |
width | string | — | Width of the dialog in any CSS unit. Must be set before opened if both are used together. |
height | string | — | Height of the dialog in any CSS unit. |
min-height | string | — | Minimum height of the dialog in any CSS unit. |
preventClose | boolean | false | When true, the dialog cannot be closed by any means. |
opened | boolean | false | Controls the open/closed state of the dialog. |
no-padding | boolean | false | Removes padding from the content area. |
footer-close | boolean | false | Adds a close button to the footer automatically. |
JavaScript API
| Name | Kind | Description | |
|---|---|---|---|
open([options]) | action | Opens the dialog. Accepts any dialog property as an option, plus an opener element reference to return focus to on close. | |
close() | action | Closes the dialog. | |
setContent(html | domNode) | action | Replaces the dialog content while open. Original content is restored on close. | |
setHeader(html | domNode) | action | Appends a secondary header while open. Original header is restored on close. | |
setSize({ width, height, minHeight }) | action | Sets dialog dimensions to the given CSS values. Height includes header + content + footer. | |
Events
| Event | Description | Returns | |
|---|---|---|---|
dialog.open | Fires when the dialog opens. | { detail: { component } } | |
dialog.close | Fires when the dialog closes. | { detail: { component } } | |
dialog.beforeClose | Fires before the dialog closes. | { detail: { component } } | |