JSFiddle - React, Tailwind, and code Playground

by Itay

HTML

<div>
<input type='text'> </input>
<button> increase width </button>
</div>

CSS

input {
    transition: width 2s;
    width: 50px;
}

div {    
    text-align: right;
    width: 450px;
}

JavaScript

$('button').click(function(){
    $('input').css('width', '300px');
    $('input').css('width', '300px');
});