JSFiddle - React, Tailwind, and code Playground

by ChangJoo Park

HTML

<button id="button">높이 변경</button>

<div class="box">
  Hello World
</div>

CSS

.box {
  width: 300px;
  height: 300px;
  background-color: tomato;
  transition: all .2s;
}

.box.expand {
  width: 500px;
  height: 500px;
}

JavaScript

document.getElementById('button').addEventListener('click', function () {
	document.querySelector('.box').className = 'box expand'
})