number class
A kind of input that handles numbers.
Methods¶
__init__() ¶
__init__(
value=None,
label=None,
step=1,
step_multiplier=10,
min=None,
max=None,
action_on_blur=False,
change_delay=None, # App config
on_action=None,
action_keys="Enter",
width=None,
on_change=None,
propagate=None, # App config
active=True,
id=None,
properties=None,
class_name=None,
hover_text=None,
) -> None
Create a new number element.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
dynamic(Any)
|
The numerical value represented by this control. |
None
|
label
|
str
|
The label associated with the number field. |
None
|
step
|
dynamic(Union[int, float])
|
The increment or decrement applied to the value when the user clicks the arrow buttons. |
1
|
step_multiplier
|
dynamic(Union[int, float])
|
The factor by which the step value is multiplied when the user holds the Shift key while clicking the arrow buttons. |
10
|
min
|
dynamic(Union[int, float])
|
The minimum acceptable value. |
None
|
max
|
dynamic(Union[int, float])
|
The maximum acceptable value. |
None
|
action_on_blur
|
bool
|
If True, the |
False
|
change_delay
|
int
|
The minimum interval (in milliseconds) between two consecutive calls to the |
App config
|
on_action
|
Union[str, Callable]
|
A function or the name of a function that is triggered when a specific key is pressed.
|
None
|
action_keys
|
str
|
A semicolon-separated list of keys that can trigger the |
Enter
|
width
|
Union[str, int]
|
The width of the element, in CSS units. |
None
|
on_change
|
Union[str, Callable]
|
A function or the name of a function that is triggered when the value changes.
|
None
|
propagate
|
bool
|
Determines whether the control's value is automatically reflected in the bound application variable. |
App config
|
active
|
dynamic(bool)
|
Indicates if this element is active. |
True
|
id
|
str
|
The identifier assigned to the rendered HTML component. |
None
|
properties
|
dict[str, Any]
|
A dictionary of additional properties that can be set to the element. |
None
|
class_name
|
dynamic(str)
|
A space-separated list of CSS class names to be applied to the generated HTML element. |
None
|
hover_text
|
dynamic(str)
|
The text that is displayed when the user hovers over the element. |
None
|