PUI. Dialog. Primitive
(pui v1.0.0)
Copy Markdown
Zero-style dialog parts.
The parts provide dialog semantics and LiveView focus commands without any presentation classes. Compose them when an application owns dialog markup.
hide/2 and show/2 target the backdrop and content elements by ID. They
default to the <root-id>-backdrop and <root-id>-content convention; pass
:backdrop_id and :content_id when the application uses other IDs.
Summary
Functions
Attributes
id(:string) (required)show(:boolean) - Defaults tofalse.alert(:boolean) - Defaults tofalse.root_id(:string) - ID of the dialog root to cancel on backdrop click. Defaults toidwithout-backdrop. Defaults tonil.- Global attributes are accepted.
Attributes
id(:string) (required)show(:boolean) - Defaults tofalse.alert(:boolean) - Defaults tofalse.- Global attributes are accepted.
Slots
inner_block(required)
Attributes
id(:string) (required)on_cancel(Phoenix.LiveView.JS) - Defaults to%Phoenix.LiveView.JS{ops: []}.show(:boolean) - Defaults tofalse.backdrop_id(:string) - Defaults to<id>-backdrop. Defaults tonil.content_id(:string) - Defaults to<id>-content. Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required)