JSFiddle - React, Tailwind, and code Playground
HTML
<div id="one">one</div>
<div id="two">two</div>
CSS
div{
border: 1px solid black;
position: absolute;
}
#one{
left: 0;
width: 100%;
}
#two{
right: 0;
display: none;
JavaScript
$('div').click(function(){
$('#one, #two').show().animate({
width: '50%'
})
});