16 · tabsNavigation & Wayfinding5 Variations
Tabs
Five accessible WAI-ARIA tabbed interfaces built on single-row horizontal scroll or vertical sidebar patterns without wrapping tab rows: underline tabs, pill tabs, vertical tabs, icon tabs, and measured sliding indicator tabs.
tabswai-ariakeyboardnavigationsegmented
Underline Tabs
tabs/underline-tabs
Loading variation tabs/underline-tabs...
Component Information
Clean single-row horizontal tablist with border-bottom selection state, ArrowLeft/ArrowRight/Home/End keyboard roving focus, and hidden inactive panels.
- Variation ID
- tabs/underline-tabs
- Motion Engine
- css
- Source File
- src/labs/components/components/tabs/variations/underline-tabs.tsx
Reduced Motion & Accessibility
Immediate panel switch without sliding indicator lag.
- Selection never depends on color alone; selected tab renders an explicit 2px bottom border.
- Keeps tabs in a single scrollable horizontal row (overflow-x-auto).
Dependencies
- lucide-react^0.553.0Required
CheckCircle2 highlight indicators
Usage Documentation
import { UnderlineTabs } from '@/src/labs/components/components/tabs';
export function SpecTabs() {
return <UnderlineTabs />;
}Props API (4)
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | — | Tabs section heading. |
| tabs | readonly TabItemConfig[] | — | Configurable tab items and panel content. |
| defaultTabId | string | — | Initially active tab ID. |
| onTabChange | (tabId: string) => void | — | Callback invoked on tab selection. |