JSFiddle - React, Tailwind, and code Playground
by 1eddy87
HTML
<input id='myTextbox1' type='text'/>
<br><br>
<span class="counter">0</span>
JavaScript
$('#myTextbox1').on('keyup', function() {
$('.counter').text($('#myTextbox1')[0].value.length);
});