JSFiddle - React, Tailwind, and code Playground
HTML
<input id="textbox">
JavaScript
document.getElementById('textbox').onkeypress =
function(e){
var c = e.which || e.keyCode;
if((c > 31 && c < 65) || (c > 90 && c < 97) ||
(c > 122 && c !== 127))
return false;
};