Layout

Tabs

Underline tabs between the sibling pages of one section, such as Overview, Run history and Git snapshots under Analytics.

Examples

Section tabs

<Tabs aria-label="Analytics sections">
  <Tab component={Link} href="/analytics" active>Overview</Tab>
  <Tab component={Link} href="/analytics/runs">Run history</Tab>
  <Tab component={Link} href="/analytics/snapshots">Git snapshots</Tab>
</Tabs>

Guidelines

  • Tabs is a nav with an aria-label; each Tab is a link (component={Link}) or a button for in-page switching. The active tab carries aria-current.
  • Two to five tabs; tabs are not a segmented control (which filters a view) and not a sidebar (which changes section).

Props

PropTypeWhat it does
aria-labelstringTabs: names the set.
component, href, activeElementType, string, booleanTab: the element, the target, the current one.