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.
Properties
Section titled "Properties"closeOnOutsideClick
Section titled "closeOnOutsideClick"Whether the dialog should be closed when clicking outside of it.
closeOnOutsideClick: boolean hideDefaultAction
Section titled "hideDefaultAction"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 keepOpenOnEscape
Section titled "keepOpenOnEscape"Whether the dialog should be kept open when pressing the 'Escape' button.
keepOpenOnEscape: boolean Whether the dialog is opened.
open: boolean returnValue
Section titled "returnValue"Sets the return value for the dialog.
returnValue: string title
Section titled "title"Sets the title of the dialog.
title: string Methods
Section titled "Methods"Closes the dialog.
hide(): Promise<boolean> Returns Promise<boolean>
Opens the dialog.
show(): Promise<boolean> Returns Promise<boolean>
toggle
Section titled "toggle"Toggles the open state of the dialog.
toggle(): Promise<boolean> Returns Promise<boolean>
Events
Section titled "Events"onClosed
Section titled "onClosed"Emitted after closing the dialog.
onClosed(args: CustomEvent<void>): void Parameters
- args:
CustomEvent<void>
Returns void
onClosing
Section titled "onClosing"Emitter just before the dialog is closed. Cancelable.
onClosing(args: CustomEvent<void>): void Parameters
- args:
CustomEvent<void>