JSFiddle - React, Tailwind, and code Playground

by Muthuraman B

HTML

<input style="width: 35px;" type="text"> <span></span>

JavaScript

$('input').on('keyup',function(){
      var input = $(this);
      input.next("span").text(input.val().length);
});