Work with Slider

The Slider API helps you control the functionality of the component through a set of handy methods.

Disabling/enabling Slider

You can control the activity of the slider via the disable/enable methods:

// disable a slider on a page
slider.disable();
 
// make the slider active again
slider.enable();

Setting value

While a user sets the value of a slider by dragging the thumb to the desired position, you can set the value from the code via the setValue method:

slider.setValue(20);

Getting value

// setting the slider value
slider.setValue(30);
 
// getting the value of the slider
slider.getValue();
Back to top