WorkspaceSwitcher
Inline tablist of workspace icons with arrow-key navigation. Compact mode shows label only on the active tab; expanded shows all labels.
Preview
Usage
import { WorkspaceSwitcher } from '@ramtt/ui'
<WorkspaceSwitcher
items={[{ id: 'team', label: 'Team', icon: <TeamIcon /> }]}
activeId={ws}
onSwitch={setWs}
variant="compact"
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| items* | WorkspaceSwitcherItem[] | — | Workspace tabs (id, label, icon) |
| activeId* | string | — | Currently active workspace id |
| onSwitch* | (id: string) => void | — | Called when a workspace is selected |
| variant | 'compact' | 'expanded' | 'compact' | Compact = active label only; expanded = all labels |
| className | string | — | Additional Tailwind classes |