JSFiddle - React, Tailwind, and code Playground
HTML
<a class="test">Click to show box</a>
<div class="box"></div>
CSS
div.box {
width: 100px;
height: 100px;
background: #0F0;
opacity: 0;
-webkit-transition: all 1s ease-in-out;
-moz-transition: all 1s ease-in-out;
transition: all 1s ease-in-out;
}
div.box.active {
opacity: 1;
}
JavaScript
$('a.test').click(function() {
$('div.box').toggleClass('active');
});