Using the inputNumber components
The inputNumber
components are created to give a user an easy way to select a number instead of writing the number in an inputText
, thereby reducing human errors and giving rich controls to the end user.
There are three inputNumber
components as shown in the following list:
inputNumberSlider
– This component displays a single marker to choose from and returns a single number between the specified minimum and maximum values. This can be displayed horizontally or vertically.inputRangeSlider
– This component displays two markers to set the minimum and maximum values of a range. This can be displayed horizontally or vertically.inputNumberSpinbox
– This component displays an input field with up and down keys to increase and decrease the number in the field by a defined step.
Both inputNumberSlider
and inputNumberSpinbox
components return a single number while inputRangeSlider
returns two numbers (minimum and maximum).
In this recipe, we will add the inputNumberSlider...