Skip to content
Design System
GitHub

Project switcher

v0.64.0, changelogBeta

The current project, and a searchable list to switch to another: recent first, then all of them or the server's matches, with New project at the end.

Default

Install
npx shadcn add @syncrobotic/project-switcher

Also installs: lucide-react@^1, @syncrobotic/cn, @syncrobotic/use-reduced-motion, @syncrobotic/command, @syncrobotic/popover, @syncrobotic/sheet, @syncrobotic/spinner

Overview

When to use

  • The sidebar's header in a multi-project console: which project the pages show.

Use something else

  • Switching sites or robots inside one project: the sidebar's own switcher menu.
  • Searching everything in the product: the command palette (Command).

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

In sidebar

Zh tw

Usage rules

  • It goes in SidebarHeader, the sidebar's switcher slot; on the rail only the mark shows.
  • Switching goes through onSelect: navigate there in your router. Recent projects come from your server or storage, most recent first.
  • More projects than a page holds: pass search and onSearchChange and give the server's matches as projects; the list filters nothing itself then.
  • New project shows only with onCreate: leave it out for a viewer who may not create one.

Changelog

  • 0.64.02026-12-01Formatted with Prettier (class order sorted); the code is unchanged.
  • 0.57.02026-11-27First release: a trigger for SidebarHeader (mark only on the rail), a popover from 640 px and a bottom sheet below, recent first, local or server search (onSearchChange, loading), View all and New project.

How to upgrade