Is this a Javascript question?
Where will the slider be?
Presumably you know how to send a number to the Arduino to get the stepper to move to a particular place or at a particular speed. The process would be the same if the number is derived from the position of the slider.
Or am I missing something ?
...R