JSFiddle - React, Tailwind, and code Playground

by klodoma

HTML

<div id="wrapper">
   Content goes here..
</div>

CSS

#wrapper{
 position: fixed;
 z-index: 101;
 top:0;
 color:#fff;
 font-weight:bold;
 font-size: 10px;
 height:50px;
 width:100%;
 min-width:50px;
 background:red;
}

#wrapper { right: 100%; transition: 1s; }
#wrapper.animate { right: 50px; }

JavaScript

$(document).ready(function(){
  setTimeout(function(){$("#wrapper").addClass("animate");}, 500);
});