JSFiddle - React, Tailwind, and code Playground

by envira

HTML

<div class="panel">
  <div class="panell"></div>
  <a href="#" class="puller">Open <span>▼</span></a>
</div>

CSS

.panell {
-webkit-border-radius: 0 0 6px 6px;
-moz-border-radius: 0 0 6px 6px;
-ms-border-radius: 0 0 6px 6px;
-o-border-radius: 0 0 6px 6px;
border-radius: 0 0 6px 6px;
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
-moz-box-shadow: 0 0 5px rgba(0,0,0,0.25);
box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
display: none;
height: 80px;
margin: 0 auto;
width: 100%;
}

.puller {
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #FFF), color-stop(100%, #F4F5F4));
background-image: -webkit-linear-gradient(#FFF,#F4F5F4);
background-image: -moz-linear-gradient(#ffffff,#f4f5f4);
background-image: -o-linear-gradient(#ffffff,#f4f5f4);
background-image: linear-gradient(#FFF,#F4F5F4);
border: 1px solid #DEDEDE;
border-top: 0;
-webkit-border-radius: 0 0 4px 4px;
-moz-border-radius: 0 0 4px 4px;
-ms-border-radius: 0 0 4px 4px;
-o-border-radius: 0 0 4px 4px;
border-radius: 0 0 4px 4px;
display: block;
font-size: 11px;
font-weight: bold;
padding: 5px 0;
margin: 0 auto;
text-align: center;
text-transform: uppercase;
width: 80px;
}

#mask {
width: 100%;
height:100%;
    background:#111;
}

JavaScript

$(".puller").click(function() {
    //Get the screen height and width
    var maskHeight = $(document).height();
    var maskWidth = $(window).width();
    //Set height and width to mask to fill up the whole screen
    $('#mask').css({'width':maskWidth,'height':maskHeight});
    //transition effect     
    $('#mask').fadeTo("slow",0.6);  
    $(".panell").slideToggle(function() {
          if($(this).is(":hidden")) {
         alert("this was a slide up");
       } 
     });
 });