Dialog
Use UseDialog() for imperative alerts and application-defined modal content.
Show a standard alert
Section titled “Show a standard alert”auto dialog = UseDialog();
Button("Delete").OnClick([dialog] { dialog.Show( "Delete item?", "This action cannot be undone.", "Delete", "Cancel", DeleteItem );})Alert overloads accept title, message, positive action, optional negative action, and callbacks. An empty callback performs the default action of dismissing the dialog. For custom content, pass a ViewFactory or a factory receiving DialogContext; the context exposes the layer ID and Dismiss().
Present custom content
Section titled “Present custom content”Use a ViewFactory when the content is self-contained and DialogFactory when an action inside the dialog needs DialogContext::Dismiss().
The factory composes in the environment captured at Show time.
Control dismissal and updates
Section titled “Control dismissal and updates”DialogOptions controls outside-press and cancel dismissal and can observe dismissal requests. Update replaces custom content for an existing layer. DialogStyle owns scrim, surface, typography, action layout, placement, geometry, indication, and motion, so Material and Flat themes can present the same intent differently.
Declarative visibility is also available through the Dialog modifier descriptor when the view tree should own visibility.
Theme and accessibility
Section titled “Theme and accessibility”Dialogs publish a modal Dialog semantic node and temporarily remove background application semantics from navigation.
The dialog exposes a dismiss action only when its cancellation policy allows dismissal, while standard actions remain ordinary semantic buttons.
UseDialog() -> DialogHandle.Show(title, message, positive = {}, on_positive_click = {}, options = {}).Show(title, message, positive, negative, positive_callback = {}, negative_callback = {}, options = {}).Show(ViewFactory, options)andShow(DialogFactory, options)plus bound-argument templates.Update(LayerId, factory)andDismiss(LayerId).DialogContext::Id()andDismiss().DialogOptions,DialogStyle,DialogFactory, and declarativeDialog.
See BottomSheet for bottom-aligned modal content.

