JSFiddle - React, Tailwind, and code Playground

HTML

<div><a href="#" id="btn">Click</a></div>
<div id="div1">Div 1</div>

CSS

#div1 {
    width:100px; height:100px; background-color:#F30; color:#FFF; text-align:center; font-size:30px;display:none;overflow:hidden;white-space: nowrap;
}

JavaScript

$('#btn').click(function() {   
    $('#div1').animate({width:'toggle'},150);
});