Tabs
Tabs switch between panes of related content that share one place on the screen, such as the profile, documents and interviews of one candidate.
Line and filled
- PassportUploaded 12 September
- Police clearanceMissing
- Welding certificateUploaded 3 September
Video interview with the shipyard in Split, Wednesday 14 October at 10:00.
- Ana Kovač moved Suman Tamang to Interview2 min ago
- The work permit for Rajesh Kumar was approved18 min ago
- Jomar Santos applied for Care assistant, Graz1 h ago
- Marko Petrović mentioned you on Welders, Split3 h ago
- Ivana shared the visa folder of Bishnu RaiYesterday
- Ana Kovač moved Suman Tamang to Interview2 min ago
- The work permit for Rajesh Kumar was approved18 min ago
- Jomar Santos applied for Care assistant, Graz1 h ago
- Marko Petrović mentioned you on Welders, Split3 h ago
WerkOS draws tabs in two ways. On a full screen or in a toolbar, the chosen tab sits in a filled box. Inside a tray or a panel, a blue line under the label marks it, over a thin rule that runs under the row.
When to use it
Use tabs for two to six panes of one thing, such as the profile, documents and interviews of a candidate, or the lists of a notifications tray.
To go to another page, use a link. To show the same candidates as a table or a board, use a segmented control. To act, such as Send offer, use a button.
Anatomy
A row of labels. A line or a filled box marks the chosen one. An icon or a count can join a label.
- Label
- 13 px on 20 px, weight 500
- Line tab
- 34 px high, 8 px at the sides, 44 px on touch
- Line
- 2 px, 4 px in from each edge, on a 1 px rule
- --brand-blue
- Filled tab
- 36 px high, 12 px at the sides, 8 px radius, 44 px on touch
- --surface-control
- Space between tabs
- 4 px
- --space-1
- Icon
- 16 px, 8 px before the label
- Count
- Counter, 8 px after the label
States
A chosen line tab turns bold inside the width it always keeps, so the row does not shift. A filled tab keeps its weight. No tab is ever disabled: when a pane has nothing to show, the pane says why.
- At rest
- Muted ink
- --text-muted
- Hover
- Full ink, no fill
- --text
- Chosen, line
- Full ink, bold, the blue line
- --brand-blue
- Chosen, filled
- Full ink on the control fill
- --surface-control
- Focus
- 2 px ring around the tab
- --focus-ring
Behavior
The line slides to the new tab in 200 ms, or moves at once with reduced motion.
When the next pane shows at once, the arrow keys choose as they move. When a pane has to load, such as a candidate's documents, the arrows only move focus and Enter chooses, so passing over a tab loads nothing.
Panes keep their state while hidden, so a half written note survives a switch. Tabs stay on one line: if they do not fit, shorten the labels. Below 640 px, a select takes the place of the row.
Keyboard and screen readers
The row is a tab list with a name. Each tab points to its pane and each pane back to its tab, so a screen reader says which tab you are on and how many there are.
- Tab
- Enters the row at the chosen tab, then moves into the pane
- Left and Right
- Move between tabs
- Home and End
- Jump to the first or last tab
- Enter or Space
- Chooses the focused tab when panes load
Permitted and not permitted
Permitted
Short nouns in sentence case
Profile, Documents, Interviews.
A count after a label
Only above zero, such as Unread 4.
Icons on every tab or on none
A lone icon pulls the eye to one tab.
Not permitted
Tabs that open other pages
Tabs promise that you stay on the page. Use links.
A disabled tab
Keep it, and explain the empty pane inside it.
More than six tabs
People stop reading them. Group the panes or use a select.