JSFiddle - React, Tailwind, and code Playground

HTML

<div class="tabbable">
    <ul class="tabs">
        <li><a href="#pig">Pig</a></li>
        <li><a href="#dog">Dog</a></li>
        <li><a href="#cat">Cat</a></li>
    </ul>
    <div class="tabcontent">
        <div id="pig" class="tab">
            Pig
        </div>
        <div id="cat" class="tab">
            Cat
        </div>
        <div id="dog" class="tab">
            Dog
        </div>
    </div>
</div>

CSS

.tabbable .tabs {list-style: none; margin: 0 10px; padding: 0;}
.tabbable .tabs li {list-style: none; margin: 0; padding: 0; display: inline-block; position: relative; z-index: 1;}
.tabbable .tabs li a {text-decoration: none; color: #000; border: 1px solid #ccc; padding: 5px; display: inline-block; border-radius: 5px 5px 0 0; background: #f5f5f5;}
.tabbable .tabs li a.active, .tabbable .tabs li a:hover {border-bottom-color: #fff; background: #fff;}
.tabcontent {border: 1px solid #ccc; margin-top: -1px; padding: 10px;}

JavaScript

$(document).ready(function(){
    $(".tabbable").find(".tab").hide();
    $(".tabbable").find(".tab").first().show();
    $(".tabbable").find(".tabs li").first().find("a").addClass("active");
    $(".tabbable").find(".tabs").find("a").click(function(){
        tab = $(this).attr("href");
        $(".tabbable").find(".tab").hide();
        $(".tabbable").find(".tabs").find("a").removeClass("active");
        $(tab).show();
        $(this).addClass("active");
        return false;
    });
});