JSFiddle - React, Tailwind, and code Playground

HTML

<div id="header">HEADER
    <input type="button" value="Toggle" id="toggle">    
</div>
<div id="map">MAP</div>
<div id="sidebar">SIDEBAR</div>

CSS

html, body {
    width:100%;
    height: 100%;
}
#header {
    width: 100%;
    height: 20%;
    float: left;
    border: 1px solid;
}
#map {
    width: 80%;
    height: 80%;
    float: left;
    border: 1px solid;
}
#sidebar {
    width: 19%;
    height: 80%;
    float: left;
    border: 1px solid;    
}
#toggle {
    width: 10%;
    height: 40%;
    margin-right: 6.5%;
    margin-top: 3.5%;
    float: right;
}

JavaScript

$(document).ready(function(){
  			$("#toggle").click(function(){
                $("#sidebar").animate({width: 'toggle'});
				$("#map").animate({width: '100%'});		
		    });
        });