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 |
---|---|---|---|
|
Union[str,Icon]
|
The label displayed in the button. |
|
|
Union[str, Callable]
|
A function or the name of a function that is triggered when the button is pressed.
|
None
|
|
Union[str, int]
|
The width of the button element. |
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
|