JSFiddle - React, Tailwind, and code Playground
HTML
<button id="btn">Try it</button>
<div id="test">
</div>
CSS
#test {
width: 500px;
height: 500px;
background-color: lightblue;
}
JavaScript
document.getElementById("test").style.display ="none";
function openTest() {
document.getElementById("test").style.display = "block";
}
document.getElementById('btn').addEventListener('click', openTest);