JSFiddle - React, Tailwind, and code Playground
HTML
<div class="mine">
</div>
<button>toggle</button>
CSS
.mine{
width: 300px;
height: 300px;
background: #9c0;
visibility: hidden;
-webkit-transition: all 0.6s;
-moz-transition: all 0.6s;
-ms-transition: all 0.6s;
-o-transition: all 0.6s;
transition: all 0.6s;
opacity: 0;
}
.mine.active{
visibility: visible;
opacity: 1;
}
JavaScript
$('.button').click(function(event) {
$('.mine').toggleClass('active');
});