A native modal Dialog with declarative invocation and explicit exit.
The browser owns modality, focus containment, Escape, light dismiss, and
restoration. initial_focus only places native autofocus in the rendered
snapshot. Applications own state, replacement, forms, commands, outcomes,
and any reinvocation after a server-rendered subtree is replaced.
Summary
Functions
Renders an initially closed native dialog and its show-modal invoker.
Functions
Renders an initially closed native dialog and its show-modal invoker.
Supply either one title slot or a nonblank accessible_label, never both.
content and close are the explicit autofocus choices; auto leaves
initial focus selection entirely to the browser. A caller supporting browsers
below the declarative invoker capability floor should provide fallback.
Attributes
id(:string) (required)accessible_label(:string) - Defaults tonil.dismissal(:atom) - Defaults to:close_request. Must be one of:none,:close_request, or:any.initial_focus(:atom) - Defaults to:auto. Must be one of:auto,:content, or:close.size(:atom) - Defaults to:default. Must be one of:small,:default,:large, or:full.alignment(:atom) - Defaults to:start. Must be one of:start, or:center.density(:atom) - Defaults to:comfortable. Must be one of:compact, or:comfortable.class(:any) - Defaults tonil.trigger_class(:any) - Defaults tonil.content_class(:any) - Defaults tonil.close_class(:any) - Defaults tonil.trigger_rest(:map) - Defaults to%{}.dialog_rest(:map) - Defaults to%{}.content_rest(:map) - Defaults to%{}.close_rest(:map) - Defaults to%{}.- Global attributes are accepted.
Slots
trigger(required)titledescriptioninner_block(required)close(required)fallback