JSFiddle - React, Tailwind, and code Playground
HTML
<!-- Research: How to restrict user input beyond maxlength in IE9 (in a good way)? -->
<textarea maxlength="25"></textarea>
CSS
textarea {
width: 100%;
height: 200px;
}
JavaScript
$("textarea").on("keypress", function () {
return this.value.length-1 < parseInt($(this).attr("maxlength"));
});
$("textarea").on("keyup", function () {
console.log( this.value.length);
return this.value.length-1 < parseInt($(this).attr("maxlength"));
});