Skip to content
Theme
endue.ai

Components, Navigation

Tabs

Tabs and segments for switching between screens, panels and views.

Name in code BaseTab

segment
underline

Tabs and segments switch between screens, panels and views. The selected item is shown with a soft surface or an underline, never with a fill. Tabs are not buttons, and the ink fill belongs to buttons only.

When to use

variant Appearance Use
segment (default) A raised item on a recessed muted track Switching screens, panels and view modes
underline No track. A 2px underline on the selected item Tabs at the top of a page, categories on the public site
  • The underline of underline uses primary-text, which is ink.
  • size is xs, sm or md. semantics is tabs or radio.
  • BaseTab semantics="radio" and CapsuleFilter semantics="radio" both mean “choose one”. Use BaseTab to switch screens and views, and CapsuleFilter to narrow a list.

Markup

<div class="BaseTab_container">
  <div role="tablist" aria-label="View mode" class="BaseTab_list BaseTab_isSegment BaseTab_md">
    <button type="button" class="BaseTab_tab" role="tab" aria-selected="true" tabindex="0" data-active="true"><span>List</span></button>
    <button type="button" class="BaseTab_tab" role="tab" aria-selected="false" tabindex="-1" data-active="false"><span>Board</span></button>
  </div>
</div>

Don’t

  • Don’t use tabs as a filter. Narrowing a list is the job of CapsuleFilter.
  • Don’t put more than five items in one row.