JSFiddle - React, Tailwind, and code Playground
HTML
<button>click to toggle</button>
<p>show/hide</p>
CSS
p { -webkit-transition: height 0.2s linear; height:100px; overflow:hidden; background: red }
p.hide { height:0 }
JavaScript
$('button').click(function() {
$('p').toggleClass('hide');
});