JSFiddle - React, Tailwind, and code Playground
HTML
<div class="tab-container">
<p class="active-tab">
<a href="">Tasks</a>
</p>
<p>
<a href="">Parts</a>
</p>
<section>
Tab 1 content
</section>
<section style="display:none">
Tab 2 Content
</section>
</div>
CSS
.tab-container {
width: 100%;
display: block;
position: relative;
}
.tab-container p {
width: auto;
border: 1px solid #ccc;
border-top: 1px solid #ccc;
border-right: 1px solid #ccc;
border-bottom: none;
border-left: 1px solid #ccc;
background-color: #d5d5d5;
display: inline-block;
margin-right: -5px;
margin-bottom: -1px;
}
.tab-container p a {
padding: 0.9375em;
display: inline-block;
color: #333;
font-size: 0.875em;
white-space: nowrap;
}
.tab-container section {
z-index: 999;
border: 1px solid #ccc;
padding: 0.9375em;
}
.tab-container .active-tab {
background-color: #fff;
margin-bottom: -1px !important;
z-index: 1000;
}