A consequential native Alert Dialog with least-destructive initial focus.
The component renders warning and cancellation structure only. The caller's action slot retains native button or form semantics and owns authorization, validation, CSRF, submission, pending state, retry, persistence, outcomes, and result announcements.
Summary
Functions
Renders an initially closed native dialog with role="alertdialog".
Functions
Renders an initially closed native dialog with role="alertdialog".
Cancellation always uses closedby="closerequest" and native autofocus.
The action slot is trusted caller HEEx; ShadcnUI does not wrap, activate,
submit, disable, authorize, or report it.
Attributes
id(:string) (required)size(:atom) - Defaults to:default. Must be one of:small,:default, or:large.class(:any) - Defaults tonil.trigger_class(:any) - Defaults tonil.content_class(:any) - Defaults tonil.cancel_class(:any) - Defaults tonil.trigger_rest(:map) - Defaults to%{}.dialog_rest(:map) - Defaults to%{}.content_rest(:map) - Defaults to%{}.cancel_rest(:map) - Defaults to%{}.action_rest(:map) - Defaults to%{}.- Global attributes are accepted.
Slots
trigger(required)title(required)description(required)inner_blockcancel(required)action(required)fallback