JSFiddle - React, Tailwind, and code Playground
HTML
<div class="box"> </div>
CSS
body {padding:50px;}
.box {
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);
}
.active{
box-shadow: 0 0px 0px 0px green, 0 0 2px rgba(0,0,0,.3);
padding-bottom: 2px;
margin-top: 2px;
}
JavaScript
$('.box')
.on('mousedown',function(){
$(this).addClass('active');
})
.on('mouseup',function(){
$(this).removeClass('active');
});