JSFiddle - React, Tailwind, and code Playground
HTML
<div id="count"></div>
<textarea class="max" maxlength="250" id="tarea"></textarea>
<div id="msg"></div>
CSS
textarea{width:400px;height:80px;}
JavaScript
$(function(){
var max = parseInt($("#tarea").attr("maxlength"));
$("#count").text("Characters left: " + max);
$("#tarea").keyup(function(e){
$("#count").text("Characters left: " + (max - $(this).val().length));
if($(this).val().length==max)
$("#msg").text("Limit Reached....");
else
$("#msg").text("");
});
});