JSFiddle - React, Tailwind, and code Playground
HTML
<input type='checkbox' class='checkdisplay' />
<div class='todisplay'>test</div>
CSS
.todisplay {
display:none;
}
JavaScript
$(document).ready(function () {
$('.checkdisplay').change(function () {
if (this.checked) $('.todisplay').fadeIn('slow');
else $('.todisplay').fadeOut('slow');
});
});