rio-labs / rio

WebApps in pure Python. No JavaScript, HTML and CSS needed
https://rio.dev
Apache License 2.0
1.31k stars 38 forks source link

`rio.(Multi)Slider` Add Range Selection Capability to `rio.(Multi)Slider` Component #46

Open Sn3llius opened 3 months ago

Sn3llius commented 3 months ago

It would be beneficial to have the ability to select a range in a Slider. I'm uncertain whether this functionality should be integrated into the existing rio.Slider() or if it should be implemented as a separate component, considering SliderChangeEvent and so on.

Result:

image

Use Case:

This feature is particularly useful in scenarios where a range of values needs to be selected, such as filtering data within a certain range, setting a range of dates, or adjusting parameters that work within a specified interval. By allowing range selection, the MultiSlider component can cater to a broader range of applications and user needs.

Related Issue:

45

mad-moo commented 3 months ago

This could either be implemented as a new component, or by adding a second value to rio.Component. If we go with the second route we just gotta make sure the names of the values don't end up being confusing.