JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="chkText"/>
JavaScript
// text box width should dynamilcly as user type words it should increases
$(document).ready(function () {
$("#chkText").on('input', function () {
alert('coucou');
var lng = $("#chkText").val().length;
$("#chkText").width(lng * 10);
});
});