JSFiddle - React, Tailwind, and code Playground
HTML
<div class='brick'></div>
CSS
.brick {
height: 100px;
width: 100px;
background-color: red;
transition: all 1s;
}
.modal {
position: fixed;
top: 50%;
left: 50%;
width: 200px;
height: 300px;
transition: all 1s;
z-index: 10;
}
JavaScript
$('.brick').click(function() {
$(this).toggleClass('modal');
});