Atelier UI

Search components…

Search components…

Workspace Switcher

A sidebar-header workspace dropdown with plan badges, a create row and search for long lists.

Edit in sandbox

Copy a prompt for your AI coding tool with the source, dependencies and usage

Props

WorkspaceSwitcherProps

Also accepts all props of Omit<React.ComponentProps<"div">, "defaultValue" | "onChange">

PropTypeDefaultDescription
workspaces* requiredWorkspace[]——
valuestring—Selected workspace id (controlled)
defaultValuestring——
onValueChange(id: string) => void——
onCreate() => void——
searchThresholdnumber5A search field is shown when there are more workspaces than this
defaultOpenbooleanfalseRender the list open on mount (without moving focus)

Install

$ npx shadcn@latest add https://chromotion.dev/r/workspace-switcher.json

More like this