JSFiddle - React, Tailwind, and code Playground
HTML
<div id="toggle">Slide</div>
<div id="space"></div>
<div id="left">
</div>
<div id="right">
</div>
CSS
#toggle {
position: absolute;
top: 10px;
left: 10px;
background: #ccc;
font-weight: bold;
padding: 10px;
cursor: pointer;
}
#left {
width: 50px;
height: 200px;
background: #a0a;
float: left;
}
#right {
width: 300px;
height: 200px;
background: 300px;
float: left;
}
#space {
clear: both;
display: block;
height: 60px;
}
JavaScript
$('#toggle').click(function() {
$('#left').toggle('slide');
});