How to design WooCommerce-like admin tabs for plugin settings page?

I’ve figured it out how to do it on my custom admin page.

You can use default wordpress classes and get variable trickery like so:

<?php
    if( isset( $_GET[ 'tab' ] ) ) {
        $active_tab = $_GET[ 'tab' ];
    } // end if
?>

<h2 class="nav-tab-wrapper">
    <a href="https://wordpress.stackexchange.com/questions/350785/?page=sandbox_theme_options&tab=display_options" class="nav-tab <?php echo $active_tab == 'display_options' ? 'nav-tab-active' : ''; ?>">Display Options</a>
    <a href="?page=sandbox_theme_options&tab=social_options" class="nav-tab <?php echo $active_tab == 'social_options' ? 'nav-tab-active' : ''; ?>">Social Options</a>
</h2>

And then wrap everything else in if($active_tab == 'desired_option'){} statements.

Credit: https://code.tutsplus.com/tutorials/the-wordpress-settings-api-part-5-tabbed-navigation-for-settings–wp-24971