The Slider is a specialized control that’s occasionally useful. You might use it to set numeric values in situations where the number itself isn’t particularly significant. For example, it makes sense to set the volume in a media player by dragging the thumb in a slider bar from side to side.
The general position of the thumb indicates the relative loudness (normal, quiet, loud), but the underlying number has no meaning to the user. Here’s an example that creates the horizontal slider.