Skip to the page content

Tabs

Switch views without leaving the page, from tabs to pills.

15 tab types

Nav tabs

Bootstrap's classic tabs. The open tab joins the panel under it and takes the palette color; a disabled tab stays readable but can't be picked.

StylesBootstrap markup

A sculpted blazer in grain de poudre wool that keeps its line.

Pick your usual size, or go one up to wear it over a shirt or fine silk.

4.8 out of 5 from 128 reviews. "Still soft after a whole winter of wear."

Prices for stockist orders of 25 or more.

Show code
<ul class="nav nav-tabs" role="tablist" aria-label="Product details">
  <li class="nav-item" role="presentation">
    <button class="nav-link active" id="desc-tab" data-bs-toggle="tab"
            data-bs-target="#desc" type="button" role="tab"
            aria-controls="desc" aria-selected="true">Description</button>
  </li>
  <li class="nav-item" role="presentation">
    <button class="nav-link" … disabled>Volume pricing</button>
  </li>
</ul>
<div class="tab-content">
  <div class="tab-pane fade show active" id="desc" role="tabpanel"
       aria-labelledby="desc-tab" tabindex="0">…</div>
</div>

Nav pills

Rounded pills with the palette fill on the chosen one. They read as a filter more than a set of pages, so they suit lists.

StylesBootstrap markup

64 team members on the roster, 5 of them new this month.

26 carers, 4 of them on call tonight.

21 nurses, including two trainees.

17 companions, all trained in dementia care.

Show code
<ul class="nav nav-pills" role="tablist" aria-label="Role">
  <li class="nav-item" role="presentation">
    <button class="nav-link active" data-bs-toggle="pill" data-bs-target="#all"
            type="button" role="tab" aria-controls="all" aria-selected="true">All team members</button>
  </li>
  …
</ul>

Underline nav

Bootstrap's quietest tab style: plain labels, and a palette-colored line under the chosen one.

StylesBootstrap markup

Oakhaven Studio, customer since March 2024.

Two sites: head office in Boulder and a branch in Aurora.

18 add-on purchases, $14,212 spent in total.

Pro plan, 42 seats, renews on October 3.

Show code
<ul class="nav nav-underline" role="tablist" aria-label="Customer">
  <li class="nav-item" role="presentation">
    <button class="nav-link active" data-bs-toggle="tab" data-bs-target="#profile"
            type="button" role="tab" aria-controls="profile" aria-selected="true">Profile</button>
  </li>
  …
</ul>

Fill and justified

.nav-fill stretches tabs to use the whole row, each as wide as its label needs. .nav-justified makes every tab the same width.

StylesBootstrap markup

A carer comes out within the customer’s service window.

Sorted on a video call, with nobody sent out.

The customer comes in to see us at the office.

Pay once, booked within two days.

Four visits a year, 10% off each one.

One deep clean a year, in the month the customer picks.

Show code
<ul class="nav nav-tabs nav-fill" role="tablist">…</ul>
<ul class="nav nav-pills nav-justified" role="tablist">…</ul>

Icons and counts

An icon before each label and a count badge after it, so a busy tab stands out before it is opened.

LabelsBootstrap markup

9 messages, 4 about arrival times.

3 estimates waiting for the customer to approve.

2 refund requests to check before paying out.

Show code
<button class="nav-link active" data-bs-toggle="tab" data-bs-target="#inbox" …>
  <i class="bi bi-inbox me-2" aria-hidden="true"></i>Inbox
  <span class="badge rounded-pill ms-1">9</span>
</button>

Card header tabs

.card-header-tabs lets the tab row sit in a card header, with the open tab running into the card body.

PlacementBootstrap markup

$41,380 from 83 shop orders, down 4% on last week.

$172,600 from 362 shop orders, up 3% on August.

$1,904,200 from 4,118 shop orders so far in 2026.

Show code
<div class="card">
  <div class="card-header">
    <ul class="nav nav-tabs card-header-tabs" role="tablist">
      <li class="nav-item" role="presentation">
        <button class="nav-link active" data-bs-toggle="tab" data-bs-target="#week" …>Week</button>
      </li>
      …
    </ul>
  </div>
  <div class="card-body"><div class="tab-content">…</div></div>
</div>

Nested tabs

A second row of pills inside a tab panel, for a section that splits again. Each row keeps its own open tab.

PlacementBootstrap markup

184 Sculpted Shoulder Blazers in the warehouse.

236 Draped Column Gowns, 40 more arriving Tuesday.

22 Cat-Eye Sunglasses ready to ship.

540 pairs of Bar Loafers, in five sizes.

Show code
<ul class="nav nav-tabs" role="tablist">…</ul>
<div class="tab-content">
  <div class="tab-pane fade show active" id="clothing" role="tabpanel">
    <ul class="nav nav-pills mb-3" role="tablist">…</ul>
    <div class="tab-content">…</div>
  </div>
</div>

Vertical pills

Pills stacked in a column with .flex-column, and aria-orientation set so the up and down arrows move between them.

VerticalBootstrap markup

186 visits completed so far today.

1,142 visits completed since Monday.

4,906 visits completed in September.

2.4 million visits booked through Fieldline since 2019.

Show code
<div class="d-flex align-items-start">
  <div class="nav flex-column nav-pills me-3" role="tablist" aria-orientation="vertical">
    <button class="nav-link active" data-bs-toggle="pill" data-bs-target="#today"
            type="button" role="tab" aria-controls="today" aria-selected="true">Today</button>
    …
  </div>
  <div class="tab-content">…</div>
</div>

Vertical with descriptions

A column of tabs with an icon and a line under each name, for settings with many sections. The bar slides down the edge, and ↑ ↓ move between sections.

VerticalBasalt upgrade

General

Name, currency and time zone.

Store name
Marlo
Currency
US dollar ($)
Time zone
America/Chicago

Shipping

Regions, carriers and rates.

Regions
4 regions, 31 countries
Free shipping from
$500.00
Carriers
UPS and DHL, next day in the continental US

Payments

Cards, invoices and payouts.

Cards
Visa, Mastercard, Amex
Invoices
Sales-led accounts, 30 days
Payouts
Every Monday

Taxes

Sales tax and invoice numbers.

Tax on clothing
By ship-to state
Tax on services
Exempt in 19 states
Next invoice number
#21186

Notifications

Alerts to your team and customers.

New order
Email and SMS
Low stock
Under 25 units
Customer receipts
On
Show code
<div class="basalt-tabs basalt-tabs-vertical" data-basalt-tabs>
  <div class="nav basalt-tabs-list" role="tablist"
       aria-orientation="vertical" aria-label="Store settings">
    <button class="nav-link active" id="general-tab" data-bs-toggle="tab"
            data-bs-target="#general" type="button" role="tab"
            aria-controls="general" aria-selected="true">
      <i class="bi bi-shop" aria-hidden="true"></i>
      <span class="basalt-tabs-text">
        <span>General</span>
        <span class="basalt-tabs-hint">Name, currency and time zone</span>
      </span>
    </button>
    …
  </div>
</div>

Tab with a dropdown

Bootstrap's own way to tuck extra tabs away: a dropdown in the tab row whose items are tabs too. The toggle lights up while one of its items is open.

OverflowBootstrap markup

3 pieces: the Sculpted Shoulder Blazer, the Draped Column Gown and the Tiered Organza Dress.

4 accessories: bar loafers, two-tone oxfords, cat-eye and shield sunglasses.

3 extras: gift cards, the Aftercare Plan and Express Delivery.

Made-to-measure tailoring from $4,800, or a styling session for $650.

Show code
<ul class="nav nav-tabs" role="tablist">
  <li class="nav-item" role="presentation">
    <button class="nav-link active" data-bs-toggle="tab" data-bs-target="#clothing" …>Clothing</button>
  </li>
  <li class="nav-item dropdown" role="presentation">
    <button class="nav-link dropdown-toggle" type="button"
            data-bs-toggle="dropdown" aria-expanded="false">More</button>
    <ul class="dropdown-menu">
      <li><button class="dropdown-item" data-bs-toggle="tab"
                  data-bs-target="#addons" type="button" role="tab">Add-ons</button></li>
    </ul>
  </li>
</ul>

Scrolling row with arrows

One row that scrolls sideways, with an arrow and a fade at whichever end has more. The picked tab always scrolls fully into view.

OverflowBasalt upgrade

1,284 visits scheduled this month.

412 visits in home care.

286 visits in pet care.

231 visits in photography.

158 visits in cleaning.

74 visits in property care.

41 visits in landscaping.

22 visits in moving.

19 visits in dog walking.

96 visits are check-ins.

63 visits are for new clients.

27 visits are repeat visits.

Show code
<div class="basalt-tabs basalt-tabs-scroll" data-basalt-tabs>
  <button type="button" class="basalt-tabs-arrow basalt-tabs-arrow-prev"
          tabindex="-1" aria-hidden="true"><i class="bi bi-chevron-left"></i></button>
  <div class="basalt-tabs-viewport">
    <div class="nav basalt-tabs-list" role="tablist" aria-label="Visit types">
      <button class="nav-link active" …>All</button>
      <button class="nav-link" …>Home care</button>
      …
    </div>
  </div>
  <button type="button" class="basalt-tabs-arrow basalt-tabs-arrow-next"
          tabindex="-1" aria-hidden="true"><i class="bi bi-chevron-right"></i></button>
</div>

Overflow into a More menu

Tabs that don't fit move into a More menu instead of wrapping onto a second row. When the open tab is in the menu, the button takes its name and the bar moves under it. Drag the width to try it.

OverflowBasalt upgrade
70%

Name, SKU ML-BLAZ and the short description in the shop.

Four sizes: S, M, L and XL, each in oatmeal or charcoal.

From $585, with 10% off orders of ten or more.

84 units in the warehouse, 20 more arriving Tuesday.

Nine photos. The first one is shown in the shop and in emails.

Rated 4.8 out of 5 from 128 reviews.

Ships in a gift box with a care card, next day in the continental US.

212 customers pay for this blazer monthly instead of at once.

Page title and description shown in search engines.

Last changed by Elaine Zeller on September 24.

Show code
<div class="basalt-tabs" data-basalt-tabs data-basalt-tabs-overflow>
  <div class="nav basalt-tabs-list" role="tablist" aria-label="Product sections">
    <button class="nav-link active" …>Overview</button>
    <button class="nav-link" …>Variants <span class="basalt-tabs-count">4</span></button>
    …
  </div>
  <!-- Filled by the script with the tabs that don't fit. -->
  <div class="dropdown basalt-tabs-more" hidden>
    <button type="button" class="basalt-tabs-more-btn"
            data-bs-toggle="dropdown" aria-expanded="false">
      <span data-basalt-tabs-more-label>More</span>
      <i class="bi bi-chevron-down" aria-hidden="true"></i>
    </button>
    <ul class="dropdown-menu dropdown-menu-end"></ul>
  </div>
</div>

Closable tabs

Tabs people open and close as they work, like a browser. The first tab is pinned. Closing the open tab moves to its neighbor, and the last one closed can be brought back.

EditableBasalt upgrade
  • #1047Phyllis DelaneyOpen in a tab$4,916.00
  • #1049The Silk RoomOpen in a tab$7,740.00
  • #1050Benjamin HartleyPaid 11:20 am$350.00

Phyllis Delaney ordered 2 × Chalk-Stripe Suit for $4,916.00. Paid by card, ready to pack.

The Silk Room ordered 6 × Sculpted Shoulder Blazer for $7,740.00. Invoice due in 30 days.

Focus a tab and press Delete to close it.

Show code
<div class="basalt-tabs basalt-tabs-closable" data-basalt-tabs>
  <div class="nav basalt-tabs-list" role="tablist" aria-label="Open orders">
    <div class="basalt-tabs-item" role="presentation">
      <button class="nav-link active" id="o1047-tab" data-bs-toggle="tab"
              data-bs-target="#o1047" type="button" role="tab"
              aria-controls="o1047" aria-selected="true"
              aria-keyshortcuts="Delete">Order #1047</button>
      <!-- For the mouse; the keyboard uses Delete on the tab. -->
      <button type="button" class="basalt-tabs-close" tabindex="-1"
              aria-hidden="true" title="Close Order #1047">
        <i class="bi bi-x-lg"></i>
      </button>
    </div>
  </div>
  <button type="button" class="basalt-tabs-add">…</button>
</div>

<script>
  const tabs = basaltTabs(document.querySelector('.basalt-tabs-closable'));
  tabs.add({ label: 'Order #1051', html: '<p>…</p>' });
  tabs.reopen();
</script>

Segmented control

A sunken track with a raised thumb that slides to the choice. Built on radio buttons, so it works as a form field and a view switch, with the browser's own arrow keys.

AnimatedBasalt upgrade

Sales period

Revenue
$6,940
Orders
14
Average order
$495.71

Best sellers

  • Draped Column Gown$2,150 · Clothing
  • Tiered Organza Dress$1,680 · plus $9/month
  • Two-Tone Oxfords$850 · Accessories
  • Shield Sunglasses$520 · Accessories
Show code
<p id="range-label">Sales period</p>
<div class="basalt-tabs basalt-tabs-segmented" data-basalt-tabs>
  <div class="basalt-tabs-list" role="radiogroup" aria-labelledby="range-label">
    <input type="radio" class="btn-check" name="range" id="range-day" value="day" checked>
    <label class="nav-link" for="range-day">Day</label>
    <input type="radio" class="btn-check" name="range" id="range-week" value="week">
    <label class="nav-link" for="range-week">Week</label>
  </div>
</div>

<!-- Icon only: add basalt-tabs-icons and keep a hidden label. -->
<label class="nav-link" for="view-grid" title="Grid">
  <i class="bi bi-grid-3x2-gap" aria-hidden="true"></i>
  <span class="visually-hidden">Grid</span>
</label>

Sliding indicator

The bar glides to the tab you pick instead of jumping, so the eye follows the change. It sits on Bootstrap's tab script and keeps its arrow keys, and adds Home and End. Switch the style to see the soft pill.

AnimatedBasalt upgrade
  • #1042Sculpted Shoulder Blazer × 2Sandra Franklin, paid 9:14 am$2,596.00
  • #1043Bar Loafers × 2Cheryl Sorensen, paid 9:31 am$1,596.00
  • #1044Tiered Organza Dress × 2Christopher Vance, paid 10:02 am$3,376.00
  • #1036Cat-Eye SunglassesIva Blackwood, label printed$481.00
  • #1038Leather Trench Coat × 3Natalie Tanner, label printed$9,616.00
  • #1039Chalk-Stripe SuitSabrina Kavanagh, label printed$2,466.00
  • #1021Draped Column Gown × 5Travis Daugherty, arrives Friday$10,766.00
  • #1024Two-Tone Oxfords × 8Leslie Whitlock, delivered$6,816.00
  • #1027Shield Sunglasses × 10Georgia Webster, arrives Thursday$5,216.00
  • #0998Sculpted Shoulder BlazerPatricia Pemberton, pulled thread$1,306.00
  • #1003Leather Trench CoatRochelle Fairbanks, wrong size$3,216.00
Show code
<div class="basalt-tabs" data-basalt-tabs>
  <div class="nav basalt-tabs-list" role="tablist" aria-label="Orders by status">
    <button class="nav-link active" id="pack-tab" data-bs-toggle="tab"
            data-bs-target="#pack" type="button" role="tab"
            aria-controls="pack" aria-selected="true">
      To pack <span class="basalt-tabs-count">12</span>
    </button>
    <button class="nav-link" id="packed-tab" data-bs-toggle="tab"
            data-bs-target="#packed" type="button" role="tab"
            aria-controls="packed" aria-selected="false">
      Packed <span class="basalt-tabs-count">5</span>
    </button>
  </div>
</div>
<div class="tab-content">
  <div class="tab-pane fade show active" id="pack" role="tabpanel"
       aria-labelledby="pack-tab" tabindex="0">…</div>
  <div class="tab-pane fade" id="packed" role="tabpanel"
       aria-labelledby="packed-tab" tabindex="0">…</div>
</div>
<!-- The indicator is added by the tabs script. -->