Represents a Dialog component.

Slots
default — Renders content inside the default slot of the dialog.
title — Renders content in the title slot of the dialog header.
message — Renders the message content of the dialog.
footer — Renders content in the dialog footer.
CSS Parts
base — The base wrapper of the dialog.
title — The title container of the dialog.
footer — The footer container of the dialog.
overlay — The backdrop overlay of the dialog.

Whether the dialog should be closed when clicking outside of it.

closeOnOutsideClick: boolean

Whether to hide the default action button for the dialog.

When there is projected content in the footer slot this property has no effect.

hideDefaultAction: boolean

Whether the dialog should be kept open when pressing the 'Escape' button.

keepOpenOnEscape: boolean

Whether the dialog is opened.

open: boolean

Sets the return value for the dialog.

returnValue: string

Sets the title of the dialog.

title: string

Closes the dialog.

hide(): Promise<boolean>

Returns Promise<boolean>

Opens the dialog.

show(): Promise<boolean>

Returns Promise<boolean>

Toggles the open state of the dialog.

toggle(): Promise<boolean>

Returns Promise<boolean>

Emitted after closing the dialog.

onClosed(args: CustomEvent<void>): void

Parameters

Returns void

Emitter just before the dialog is closed. Cancelable.

onClosing(args: CustomEvent<void>): void

Parameters

Returns void