JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<div class="bg">
<img src="https://static.pexels.com/photos/70497/pexels-photo-70497.jpeg" class="thumbnail"/>
<div class="slide-down">
<div class="header-container">
<h2>Food</h2>
</div>
<div class="description-container">
<p>A short and enticing description of the menu item!</p>
</div>
<div class="side-container">
<h3>Sides:</h3>
<button>Side</button>
<button>Side</button>
</div>
</div>
</div>
</div>
CSS
.thumbnail{
width: 140px;
height: 100px;
display:block;
z-index:10;
cursor: pointer;
-webkit-transition-property: all;
-webkit-transition-duration: 0.3s;
-webkit-transition-timing-function: ease;
margin: 0 auto;
position: relative;
top: 50%;
transform: translateY(-50%);
border-radius: 2px;
}
.bg:hover {
transform: scale(1.25);
}
.bg{
width: 155px;
height: 120px;
background-color: rgba(189, 193, 192, 1);
background: -webkit-linear-gradient(top, rgba(189, 193, 192, 1) 0%, rgba(255, 255, 255, 1) 100%);
background: linear-gradient(to bottom, rgba(189, 193, 192, 1) 0%, rgba(255, 255, 255, 1) 100%);
border-radius: 2px;
}
.slide-down {
border-radius: 3px;
height: 60px;
width: 155px;
position: relative;
transition: height 0.3s;
-webkit-transition: height 0.3s;
text-align: center;
overflow: hidden;
background-color: rgba(189, 193, 192, 1);
background: -webkit-linear-gradient(top, rgba(255, 255, 255, 1) 0%, rgba(189, 193, 192, 1) 100%);
background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(189, 193, 192, 1) 100%);
}
.bg:hover .slide-down {
height: 155px;
}
.container{
position: relative;
left: 150px;
top: 50px;
}
.header-container{
background: orange;
border-radius: 2px;
margin: 8%;
position: relative
overflow: hidden;
}
.slide-down p{
font-size: 15px;
line-height: 13px;
}
.description-container{
position: relative;
background: #fff;
margin: 4%;
padding-left: 5%;
border-radius: 2px;
height: 50px;
}
.description-container p{
position: relative;
top: 50%;
transform: translateY(-50%);
text-align: left;
line-height: 15px;
}
.slide-down h3{
margin-top: 3px;
padding-top: 0;
float: left;
margin-left: 4%;
margin-right: 3px;
font-size: 18px;
}
.side-container button{
width: 40px;
height: 22px;
margin: 2px;
display: inline-block;
float: left;
overflow: hidden;
background: #F14453;
border: none;
text-decoration: none;
...