JSFiddle - React, Tailwind, and code Playground
HTML
<div class="block"></div>
<button>Click</button>
CSS
.block{
position:absolute;
top: -webkit-calc(100% - 110px);
right:10px;
left:10px;
height:100px;
background:gray;
-webkit-transition: all 2s;
/*this adds GPU acceleration*/
transform: translate3d(0,0,0);
-webkit-transform: translate3d(0,0,0);
}
.block.hide{
top: -100px;
}
JavaScript
document.querySelector("button").addEventListener("click",function(){
document.querySelector(".block").classList.add("hide");
});