JSFiddle - React, Tailwind, and code Playground

by nikolya223

HTML

<div class="box"> </div>

CSS

body {padding:50px;}
.box {
    width: 300px;
    height: 100px;
}
.box:before{
    width: 300px;
    height: 100px;
    border: 1px solid green;
    border-radius: 13px;
    box-shadow: 0 4px 0px 0px green, 0 0 2px rgba(0,0,0,.3);
    display: block;
    content: "";
}
.box:hover{
    padding-top: 10px;
}
.box:hover:before{
    box-shadow: 0 0px 0px 0px green, 0 0 2px rgba(0,0,0,.3); 
}

JavaScript

$('.box')
.on('mousedown',function(){
    $(this).addClass('active');
})
.on('mouseup',function(){
    $(this).removeClass('active');
});