JSFiddle - React, Tailwind, and code Playground
by Lal Prakash
HTML
<div class="box">Hide on button click!!
<button onclick="myFunction()">Close</button>
</div>
JavaScript
function myFunction() {
document.getElementsByClassName("box")[0].style.display = 'none';
}