JSFiddle - React, Tailwind, and code Playground
HTML
<div id="samples" class="collappsed" onclick="expandList()">
<ul id="sample-list" class="list"></ul>
</div>
CSS
#samples {
position: fixed;
margin-top: 100px;
padding-top: 30px;
width: 150px;
height: 400px;
overflow-y: scroll;
z-index: 999;
background-color: rgba(230, 230, 230, 0.7);
border-style: solid;
border-color: rgba(30, 30, 30, 1);
border-width: 0px 20px 0px 0px;
border-radius: 5px;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#samples:hover {
cursor: pointer;
}
#samples .meme-title {
display: none;
}
#samples .list {
list-style-type: none;
margin: 0;
padding: 0;
}
#samples .list li {
display: inline-block;
position: relative;
}
.thumbs-top {
background: #eee;
white-space: nowrap;
margin-left: 5px;
width: 120px;
z-index: 2;
height: 100px;
}
.expanded {
left: 0px;
}
.collappsed {
left: -130px;
}
JavaScript
function expandList() {
$("#samples").attr("collappsed", "expanded");
}