JSFiddle - React, Tailwind, and code Playground
HTML
<input type="number" id="num">
JavaScript
$("#num").keypress( function(e) {
var current_val = $(this).val();
var typing_char = String.fromCharCode(e.which);
if (parseFloat(current_val + "" +typing_char) > 900) {
return false;
}
})