Navigation

Tabs
v1.0.9
Ready for Production

Tab navigation for organizing related content into distinct views with accessible keyboard navigation and state management. Built on Radix UI Tabs.

Prefer AI-assisted development?

This documentation is available via the Catalyst MCP Server. Learn how to connect →

Catalyst Tabs extends Radix UI's Tabs primitive with a dual className/classNameInner pattern for layered customization and design token integration — giving you accessible, keyboard-navigable tab navigation with zero configuration.

Preview

Installation

npm install @pmi/catalyst-tabs
import { TabsRoot, TabsList, TabsTrigger, TabsContent } from '@pmi/catalyst-tabs';

Variants

Disabled

Disable individual tab triggers to prevent interaction during loading or restricted access states.

Preview

API Reference

TabsRoot

The root container that manages active tab state. TabsTrigger and TabsContent must be descendants of TabsRoot.

Prop

Type

TabsList

Container for tab triggers. Handles roving tabindex and arrow-key focus management automatically.

Prop

Type

TabsTrigger

Individual tab button. Accepts two className props for layered styling:

  • className — outer container: border, layout, active-state indicator
  • classNameInner — inner wrapper: text color, hover background, focus ring

Prop

Type

TabsContent

Content panel shown when its associated trigger is active. Hidden panels are removed from the accessibility tree.

Prop

Type

Accessibility

Catalyst Tabs meets WCAG 2.2 AA standards by delegating all ARIA management to Radix UI.

Keyboard Interactions

KeyAction
TabMove focus into the tablist (lands on the active trigger); Tab again moves focus to the active tabpanel
Shift + TabMove focus in reverse through the tab sequence
Arrow Left / Arrow RightMove focus between tab triggers (horizontal orientation); activates immediately in automatic mode
Arrow Up / Arrow DownMove focus between tab triggers (vertical orientation); activates immediately in automatic mode
HomeMove focus to the first tab trigger
EndMove focus to the last tab trigger
Enter / SpaceActivate the focused tab trigger (required in manual mode; redundant in automatic mode)

Activation modes:

  • automatic (default) — arrow keys move focus and activate the tab immediately
  • manual — arrow keys only move focus; Enter/Space is required to activate the focused tab

ARIA

Radix UI manages all required attributes automatically:

  • TabsList receives role="tablist" and aria-orientation. When multiple tab groups exist on a page or the tablist purpose is not clear from surrounding context, pass aria-label to TabsList to provide an accessible name.
  • TabsTrigger receives role="tab", aria-selected, aria-controls, and aria-disabled. Triggers derive their accessible name from their visible text content.
  • TabsContent receives role="tabpanel", aria-labelledby, and tabindex="0" (making the active panel keyboard-focusable so Tab from the active trigger moves focus directly into the panel); inactive panels are hidden from the accessibility tree.

Choosing the Right Component

Use caseComponent
Content sections that expand/collapse verticallyAccordion
Multi-step workflow with sequential progressionProgress Stepper
Page-level navigation linking to different routesNavigation Menu

On this page