Components Overlays
Dialog
A window over the page: the browser's own <dialog>, opened and closed by buttons, with no script.
$ pyblade ui:add dialog
Edit profile
Alert dialog
Not dismissible: one of its buttons has to be picked.
Props
Written as attributes of <pb-ui.dialog>; put a colon before one to pass it a Python value, as in :items="items". A slot is written <pb-slot:name>.
| Name | Type | Default | Description |
|---|---|---|---|
| id | str | required | Unique on the page |
| title | str | "" | |
| description | str | "" | |
| trigger | slot | "" | A button with commandfor="the id" command="show-modal" |
| footer | slot | "" | Its buttons |
| dismissible | bool | True | Whether Escape, a click outside or its close button close it |
| role | str | "dialog" | alertdialog for a dialog that asks to confirm |
| class | str | "" | Added to the classes of the component. Every other attribute is spread on it too. |