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

PropTypeDefaultDescription
items*WorkspaceSwitcherItem[]Workspace tabs (id, label, icon)
activeId*stringCurrently active workspace id
onSwitch*(id: string) => voidCalled when a workspace is selected
variant'compact' | 'expanded''compact'Compact = active label only; expanded = all labels
classNamestringAdditional Tailwind classes