-1

I want just to put a type number in an input react js, is there any particular function that i should add to restict the input only in number type and to control the max and min

Maria-Elena
  • 127
  • 1
  • 11

2 Answers2

0

You can directly use <input type="number"/> for that. This will make the restriction at the HTML level itself.

Gaurav
  • 782
  • 5
  • 12
0

Have you tried

<input type="number" />

Check this docs for more infos on different types

Pierre Ferry
  • 1,329
  • 12
  • 18