JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" id="check">
<div id="box"></div>
CSS
#box {
background: lightblue;
width: 200px;
height: 200px;
}
JavaScript
$("#check").on("change", function(e){
$("#box").toggle();
});