JSFiddle - React, Tailwind, and code Playground
HTML
<div id="wrapper">
<div id="content">
<div id="toggle-view"><p>This is the toggle-view</p></div>
<div id="view" />
</div>
</div>
CSS
#wrapper { width: 100px; height: 100px; margin: 0 auto 0 auto; background: red; }
#content { width: auto; height: auto; position: relative; z-index: 20; }
#toggle-view { display: block; width: 100%; height: 25%; cursor: pointer; position: absolute; left: 12px; right: 10px; z-index: 10; }
#view { width: 100%; height: 100%; position: relative; z-index: 1; background-color: #FFF