JSFiddle - React, Tailwind, and code Playground

HTML

<button>click to toggle</button>
<div><p>show/hide</p></div>

CSS

div{ height:100px; overflow:hidden; }

p { -webkit-transition: -webkit-transform 0.2s linear; 
    -webkit-transform: translate3d(0,0,0);
    height:100px; background: red; }

p.hide { -webkit-transform: translate3d(0,-100px,0); }

JavaScript

$('button').click(function() {
    $('p').toggleClass('hide');
});