JSFiddle - React, Tailwind, and code Playground
by Waterstraal
HTML
<div class="row">
<div class="actionPanel">Click</div><div class="resultPanel">Result panel</div>
</div>
CSS
body {
padding:10px;
}
.row {
width:500px;
height: 50px;
overflow:hidden;
border:1px solid #ccc;
}
.resultPanel {
display:inline-block;
width:450px;
height: 50px;
background: #ddd;
}
.actionPanel {
display:inline-block;
width:50px;
height: 50px;
background:#eee;
}
JavaScript
$(".actionPanel").on("click", function () {
$(this).animate({
width: ["200px", "swing"]
}, 500, function () {
// Animation complete.
});
});