Black Lives Matter. Please consider donating to Black Girls Code today.

Range Slider With Fixed Distance between handles

Hi All,
I am trying to control a graph with a range slider.
Is there a way to lock the distance between two handles? If so, some example code would be much appreciated!

Check out the docs here for range sliders. If you don’t have any callbacks that alter the min/max values then it will be static. Otherwise, you will need to “lock” the range of the slider via a callback that has logic per your design and set the min/max values accordingly.

Hey - thanks for the response!
To clarify, I don’t mean the maximal range of the slider, but the distance between two handles - edited previous content to better convey this