RangeInput¶
pywry.toolbar.RangeInput
¶
Bases: ToolbarItem
A dual-handle range slider for selecting a value range.
Emits {start: ..., end: ..., componentId: ...} on range change.
This component provides a single slider track with two handles for selecting a minimum and maximum value. Unlike SliderInput which selects a single value, RangeInput allows users to define a range of values.
| ATTRIBUTE | DESCRIPTION |
|---|---|
start |
Initial start (lower) value (default: 0).
TYPE:
|
end |
Initial end (upper) value (default: 100).
TYPE:
|
min |
Minimum allowed value for the track (default: 0).
TYPE:
|
max |
Maximum allowed value for the track (default: 100).
TYPE:
|
step |
Step increment (default: 1).
TYPE:
|
show_value |
Display the current range values next to the slider (default: True).
TYPE:
|
debounce |
Milliseconds to debounce input events (default: 50).
TYPE:
|
Examples:
>>> RangeInput(
... label="Price Range:",
... event="filter:price",
... start=100,
... end=500,
... min=0,
... max=1000,
... step=10,
... )
Functions¶
auto_generate_component_id
¶
auto_generate_component_id() -> ToolbarItem
Auto-generate component_id based on type if not provided.
validate_event_name
classmethod
¶
Validate event follows namespace:event-name pattern.