Skip to content
Components

Tabs

Underline tabs and pill tabs with full keyboard navigation (arrow keys, Home/End).

Underline (default)

Overview content.

Pill tabs

Markup

html
<div class="b-tabs" role="tablist">
  <button class="b-tab" role="tab" aria-selected="true" aria-controls="p1" id="t1">One</button>
  <button class="b-tab" role="tab" aria-selected="false" aria-controls="p2" id="t2">Two</button>
</div>
<div id="p1" class="b-tab-panel" role="tabpanel" aria-labelledby="t1">First panel.</div>
<div id="p2" class="b-tab-panel" role="tabpanel" aria-labelledby="t2" hidden>Second panel.</div>

Keyboard

| Key | Action | | --- | --- | | Left/Right | Move focus to previous/next tab | | Home / End | Jump to first/last tab | | Enter / Space | Activate the focused tab |

API

| Class | Effect | | --- | --- | | .b-tabs | Tab list (underline style) | | .b-tabs-pill | Pill style | | .b-tab | Individual tab | | .b-tab-panel | Tab content panel |

Edit this page