JSFiddle - React, Tailwind, and code Playground
HTML
<div class="slider"></div>
CSS
.slider {
position: fixed;
right: -370px;
top: 120px;
z-index: 99997;
width:400px;
height:300px;
background: red;
}
JavaScript
jQuery(function (){
jQuery(".slider").click(function(){
jQuery('.slider').stop(true,false).animate({right: "0" }, 800, 'easeOutQuint' ); },
function(){
jQuery(".slider").stop(true,false).animate({right: "-0" }, 800, 'easeInQuint' );
},1000); });