button class
A control that can trigger a function when pressed.
Methods¶
__init__() ¶
__init__(
label="",
on_action=None,
width=None,
active=True,
id=None,
properties=None,
class_name=None,
hover_text=None,
) -> None
Create a new button
element.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
label |
Union[str,Icon]
|
The label displayed in the button. |
|
on_action |
Union[str, Callable]
|
A function or the name of a function that is triggered when the button is pressed.
|
None
|
width |
Union[str, int]
|
The width of the button element. |
None
|
active |
bool
|
Indicates if this component is active. |
True
|
id |
str
|
The identifier that is assigned to the rendered HTML component. |
None
|
properties |
dict[str, Any]
|
Bound to a dictionary that contains additional properties for this element. |
None
|
class_name |
str
|
The list of CSS class names that are associated with the generated HTML Element. |
None
|
hover_text |
str
|
The information that is displayed when the user hovers over this element. |
None
|