Components
Tabs
Keyboard-navigable tab panels with underline, boxed, and pills variants.
Switch between content views using keyboard navigation. Supports disabled tabs, badge counts, and three visual styles.
Installation
Usage
Keyboard Shortcuts
| Key | Action |
|---|---|
← / h | Previous tab |
→ / l | Next tab |
1–9 | Jump to tab by index |
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
tabs | Tab[] | — | Tab definitions (required) |
activeKey | string | — | Currently active tab key |
onChange | (key: string) => void | — | Called on tab change (required) |
position | 'top' | 'bottom' | 'top' | Tab bar position |
variant | 'underline' | 'boxed' | 'pills' | 'underline' | Visual style |
focus | boolean | true | Accept keyboard input |
theme | InkUITheme | darkTheme | Color theme |
Tab Object
| Field | Type | Description |
|---|---|---|
key | string | Unique identifier |
label | string | Display label |
badge | number | Optional badge count |
disabled | boolean | Disable this tab |