Skip to main content


returns the current value of Slider

getValue(): number[];


An array with the current value of the slider.


const value = slider.getValue(); // -> [20]

// for a range slider as an array
const value = slider.getValue(); // -> [20,50]

Related sample: Slider. Get value


In case you've set the value of Slider (via setValue()) as an array where the first number is greater than the second one, e.g. [50,20], getValue() will return the value as an array with numbers in the ascending order, that is [20,50].