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 on_action callback, args will be set to -1. |
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 on_action callback (that index is -1 for the close icon). |
None
|
|
Union[str, int, float]
|
The width of this dialog, in CSS units. |
None
|
|
Union[str, int, float]
|
The height of this 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 component is active. |
True
|
|
str
|
The identifier that is assigned to the rendered HTML component. |
None
|
|
dict[str, Any]
|
Bound to a dictionary that contains additional properties for this element. |
None
|
|
str
|
The list of CSS class names that are associated with the generated HTML Element. |
None
|
|
str
|
The information that is displayed when the user hovers over this element. |
None
|