Skip to main content
  1. Docs
  2. Components
  3. Navigation

Tabs

Views of the same thing, one at a time. One Tab stop; the arrow keys move between them.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<div role="tablist">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • Views of one record: a user's profile, security and sessions.
  • A few views of one card or panel, contained.
  • A page header's sections, under the title.
Not for

02

Anatomy

  1. 1tabs-list<div role="tablist">The tabs: one Tab stop.
  2. 2tab<button role="tab">The selected tab: weight 600, its icon filled.
  3. 3tab-badge<span>A count, on the label's baseline.
  4. 4tabs-indicator<span>The Ember bar; it slides to a new tab.
  5. 5tabs-panel<div role="tabpanel">The selected tab's view.

03

Do and don't

Views, not steps
DoViews of one user, read in any order.
Don'tA flow in tabs: nothing says what's done. Use Steps.
A word or two
DoShort nouns: the page says whose they are.
Don'tLabels that repeat the page, and scroll.
Counts that help choose
DoOne count, where it says what's waiting.
Don'tA count on every tab: nothing stands out.

04

Content

  • One or two words, nouns: Profile, Security, Sessions.
  • Sentence case. Icons on every tab, or none.
  • Name the list with aria-label: the page's subject.
Next — TabsAPI