Skip to content

Slider

render_slider(value=None, on_change=None, min_=None, max_=None, decimal_places=0, id_=None, str_labels=None, **slider_props)

My defaults for rx.slider.

PARAMETER DESCRIPTION
value

Value for the slider.

TYPE: StateAttr[int | float | list[int | float]] | None DEFAULT: None

on_change

Event handler to call when the slider value changes.

TYPE: HandlerType | None DEFAULT: None

min_

Minimum value for the slider.

TYPE: StateAttr[int | float] | None DEFAULT: None

max_

Maximum value for the slider.

TYPE: StateAttr[int | float] | None DEFAULT: None

decimal_places

Number of decimal places to round to.

TYPE: int DEFAULT: 0

id_

ID for the slider.

TYPE: str | None DEFAULT: None

str_labels

Labels to show instead of exact values.

TYPE: tuple[str, str, str] | None DEFAULT: None

**slider_props

Additional properties for the slider.

DEFAULT: {}

RETURNS DESCRIPTION
Component

rx.Component: A slider component.