JSFiddle - React, Tailwind, and code Playground
HTML
<div id='ModalId' class="Modal" > content <br> content </div>
<button>show</button>
CSS
.Modal {
display: block;
opacity: 0;
transition: all 300ms ease 0s;
height: 0px;
overflow: hidden;
}
.ModalVisible {
display: block;
opacity: 1;
height: 50px;
}
JavaScript
$('button').on('click', function () {
$('#ModalId').addClass('ModalVisible');
});