Workspace Switcher
Compact workspace/org switcher for app chrome.
Import
tsx
import { WorkspaceSwitcher } from "@cronus-ui/ui";
bash
npx cronus-ui add workspace-switcher
Examples
API Reference
Generated from the component's exported types.
WorkspaceSwitcherProps
| Prop | Type | Default | Description |
|---|---|---|---|
workspaces* | readonly WorkspaceItem[] | — | — |
value | string | — | Controlled selected workspace id. Pair with `onValueChange`. |
defaultValue | string | — | Uncontrolled initial workspace id. Defaults to the first workspace. |
onValueChange | (id: string) => void | — | Called with the selected workspace id. |
labels | WorkspaceSwitcherLabels | — | Override any subset of the built-in English strings. |
className | string | — | — |
ref | Ref<HTMLButtonElement> | — | Forwarded to the trigger button. |