Skip to Content

Team Switcher

Team switcher dropdown: an outline button showing the current team with avatar and badge opens a menu of grouped radio items with descriptions and an optional create item. Controlled or uncontrolled.

Installation

pnpm dlx shadcn@latest add @01orbital/team-switcher

Usage

import { TeamSwitcher } from "@/components/team/team-switcher"

Needs props to render

Pass groups; see the API reference below.

API reference

A team picker menu. The props not listed here go to the trigger button.

Prop

Type

It also accepts the props of the Base UI part it wraps, and the HTML attributes of the element it renders.

Dependencies

npm: @phosphor-icons/react, cn. The CLI installs them for you.

Requires these pieces. The CLI adds each one that is missing and won't replace a file you already have unless you choose to:

The shadcn parts here are their Base UI versions, and this piece uses Base UI's API. A Radix version you already have won't work with it.

Used in blocks

One block is built with Team Switcher.

Last updated on