Skip to content
Components

Tabs

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

Underline (default)

Overview content.

Pill tabs

Today's schedule.

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

KeyAction
Left/RightMove focus to previous/next tab
Home / EndJump to first/last tab
Enter / SpaceActivate the focused tab

API

ClassEffect
.b-tabsTab list (underline style)
.b-tabs-pillPill style
.b-tabIndividual tab
.b-tab-panelTab content panel
Edit this page