Skip to content
Navigation

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

Skip WorkspaceSwitcherProps props table
PropTypeDefaultDescription
workspaces*
readonly WorkspaceItem[]
value
stringControlled selected workspace id. Pair with `onValueChange`.
defaultValue
stringUncontrolled initial workspace id. Defaults to the first workspace.
onValueChange
(id: string) => voidCalled with the selected workspace id.
labels
WorkspaceSwitcherLabelsOverride any subset of the built-in English strings.
className
string
ref
Ref<HTMLButtonElement>Forwarded to the trigger button.