JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" class="checkbox">

<div class="div_box">
  Show me when checkbox is checked and hide me when checkbox is unchecked.
</div>

CSS

.div_box {
    border: 1px solid #aaa;
    padding: 10px;
    display: none;
  }

  .checkbox:checked + .div_box {
    display: block;
  }