what are the advantages and disadvantages of range slider type input as compared with the classical number input? When it is better to use them?
You can have both or just one, it really depends directly on your use case:
- Input field usually works fine in any case if enough helping information is provided (field format, field name, helping text)
- Input field + range slider (after of below) is used when you want to give the user broad control over a pre-defined range of values with increments; For example you can have this control for configuring a Virtual Machine and choosing 2-4-8-16-32 GB of RAM.
- Range slider is used only when having a predefined range of values and your users are not tech savvy and use the mouse most of the time or as an input alternative for touch devices.
Those are just a few examples but keep in mind at all times that the range slider is not friendly for keyboard navigation in a form or any place.
Range sliders has a technical advantage above the input field as it will require less validation in order to make secure. For the very same reason it can benefit the user since a range slider wont raise an unnecessary error due to "malformed" input.
Range sliders are, however, somewhat limited in that they cannot allow an infinite range of numbers which makes them impractical for say, a phone number or a date.
Range sliders works very well when you have a strictly defined interval that can only have a small number of values. For example, dining guest reservations or maybe a volume control
In range slider you have to put a range value for your client but, in input field the client can put value without any limit.
If you have a range value is a small numbers for example
0-10 you can use range slider but, if your range is very high for example
0-1000 or infinite I suggest you to use number input field.