Skip to content

init

__all__ = ['control_area', 'control_group', 'control_item', 'render_slider'] module-attribute

control_area(heading, items)

For grouping together multiple control groups with a heading.

control_group(heading, items, mode='grid')

For grouping together multiple control items with a heading.

control_item(label, item, description=None, width=None, flex=None)

Groups together a label, item, and optional description.

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.