yr.slider
slider(
min_value: float,
max_value: float,
label: str,
default_value: float | None = None,
) → floatPresent the user with a slider over a numeric range.
Parameters
min_value
type: float
Lower bound of the slider.
max_value
type: float
Upper bound of the slider.
label
type: str
Prompt shown alongside the slider.
default_value
type: float | None = None
Optional initial position. Defaults to
min_value if not provided.
Returns
type: float
The value the user selected.