JSFiddle - React, Tailwind, and code Playground
HTML
<input value="press" type="button" onclick="myclick()">
<div id="div">
</div>
CSS
#div{width:100px;height:100px; border: 1px solid black; transition: width 0.3s, height 0.3s;}
JavaScript
function myclick(){
document.getElementById("div").style.height="200px"
}