JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="input" placeholder="placeholder" />
<span id="msg"></span>
JavaScript
$(document).ready(function()
{
$(document).on("input", "#input", function()
{
$("#msg").empty();
$("#msg").text($("#input").val().length);
});
});