dialog class
A modal dialog.
Methods¶
__init__() ¶
__init__(
open=False,
on_action=None,
close_label="Close",
labels=None,
width=None,
height=None,
page=None,
partial=None,
active=True,
id=None,
properties=None,
class_name=None,
hover_text=None,
) -> None
Create a new dialog
element.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
bool
|
If True, the dialog is visible. If False, it is hidden. |
False
|
|
Union[str, Callable]
|
A function or the name of a function triggered when a button is pressed.
|
None
|
|
str
|
The tooltip of the top-right close icon button. In the |
Close
|
|
Union[str, list[str]]
|
A list of labels to show in a row of buttons at the bottom of the dialog. The index of the button in the list is reported as args in the |
None
|
|
Union[str, int, float]
|
The width of the dialog, in CSS units. |
None
|
|
Union[str, int, float]
|
The height of the dialog, in CSS units. |
None
|
|
str
|
The page name to show as the content of the block. |
None
|
|
Partial
|
A Partial object that holds the content of the block. |
None
|
|
bool
|
Indicates if this element is active. |
True
|
|
str
|
The identifier assigned to the rendered HTML component. |
None
|
|
dict[str, Any]
|
A dictionary of additional properties that can be set to the element. |
None
|
|
str
|
A space-separated list of CSS class names to be applied to the generated HTML element. |
None
|
|
str
|
The text that is displayed when the user hovers over the element. |
None
|