JSFiddle - React, Tailwind, and code Playground
by SutonJ
HTML
<div class="box"></div>
<button onclick="increaseDiv()">Click</button>
CSS
.box {
width: 300px;
height: 200px;
position: absolute;
left: 100px;
background: black;
}
JavaScript
function increaseDiv() {
var myDiv = document.querySelector(".box")
var currWidth = myDiv.clientWidth;
var currHeight = myDiv.clientHeight;
myDiv.style.width = currWidth + 50 + "px";
myDiv.style.height = currHeight + 50 + "px";
}