Represents a Dialog component.

  • 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.

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.

Callable

  • Returns ReactNode

Events

onClosed: (args: CustomEvent<void>) => void

Emitted after closing the dialog.

Type declaration

onClosing: (args: CustomEvent<void>) => void

Emitter just before the dialog is closed. Cancelable.

Type declaration

Methods

  • Closes the dialog.

    Returns Promise<boolean>

  • Opens the dialog.

    Returns Promise<boolean>

  • Toggles the open state of the dialog.

    Returns Promise<boolean>

Properties

closeOnOutsideClick: boolean

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

hideDefaultAction: 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.

keepOpenOnEscape: boolean

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

open: boolean

Whether the dialog is opened.

returnValue: string

Sets the return value for the dialog.

title: string

Sets the title of the dialog.