How to use react native slider to take input

Components

React-native slider is a useful component to take numeric input like age of a user. Lets see how we can use it to take a numeric input.

Please note, that its important to give style width to the slider component, otherwise it won’t work. Its also better to set step prop to 1, otherwise the input will be in decimal number.  Props minimumValue and maximumValue are set to range between which you want to take input.

Leave a Reply

Your email address will not be published. Required fields are marked *