JSFiddle - React, Tailwind, and code Playground
HTML
<input class="input1" type="text"/>
JavaScript
$( function(){//Gestion agrandissement input
$('body').on('keyup','.input1', function(){
$this=$(this);
$this.css({width:$this.val().length*10 +"px"});
});
})