Check out example codes for "html input number ra". It will help you in understanding the concepts better.

Code Example 1

<label for="quantity">Quantity (between 1 and 5):</label>
<input type="number" 
  id="quantity" name="quantity" min="1" max="5">

Learn ReactJs, React Native from akashmittal.com