RRigdesign system
Navigation

Tabs

Switch between views in the same context, with seven semantic styles.

Examples

Account health, usage and recent activity.

States

Rendered states (visual reference; the live example above is the accessible one)
DefaultHoverFocus visiblePressedDisabled
Inactive
Active

Anatomy

Tabs anatomy
#PartDescriptionPresence
1Tab listRow of tabs with an underlineRequired
2TabButton with role=tabRequired
3PanelContent with role=tabpanelRequired
4IndicatorActive underline slidesRequired

Specifications

StylesSeven pre-configured semantic styles

Interaction

Keyboard
KeyResult
TabMoves into the tab list on the active tab, then to the panel
← →Moves focus between tabs (and selects, with automatic activation)
Home EndFirst / last tab
DeleteOptional: closes a closable tab
Pointer and touch
TriggerResponse
ClickSelects, indicator slides in 200ms
HoverText brightens

Accessibility

role · tablist

1.3.1Info and Relationships2.1.1Keyboard4.1.2Name, Role, Value
Requirements
RequirementHow Rig meets it
Rolestablist, tab, tabpanel with aria-controls and aria-labelledby
Roving tabindexOnly the active tab has tabindex="0"
Selectedaria-selected, not colour alone
Disabledaria-disabled; remains reachable only if it needs explaining
Paneltabindex="0" when it has no focusable content

Read the matching WAI pattern ↗

Usage

Do and don’t
DoDon’t
Use for views of the same contentDo not use tabs for navigation between pages
Keep labels to one or two wordsDo not use more than 6 tabs