Dropdown
Switcher Dropdown
NewA pill that switches between accounts, workspaces or projects, with avatars, plan badges and a create row at the bottom.
npx motionsnack add switcher-dropdownCustomize
<SwitcherDropdown />Props
18 properties
| Property | Type | Default | Description |
|---|---|---|---|
| items | { value: string; label: string; description?: string; badge?: string; image?: { src: string; alt?: string } }[] | 3 demo accounts | Accounts, workspaces or projects. Without an image the initials are shown. |
| value | string | - | Chosen value (controlled). |
| defaultValue | string | first item | Value chosen at first render (uncontrolled). |
| onChange | (value: string, item: SwitcherDropdownItem) => void | - | Called when the user picks an item. |
| action | { label: string; href?: string } | { label: 'Create workspace' } | Row under the items. An empty label hides it. |
| onAction | () => void | - | Called when the action row is picked. |
| open | boolean | - | Open state (controlled). |
| defaultOpen | boolean | false | Open state at first render (uncontrolled). |
| onOpenChange | (open: boolean) => void | - | Called whenever the list opens or closes. |
| disabled | boolean | false | Disables the button. |
| className | string | '' | Extra classes on the wrapper. |
| leading | 'avatar' | 'list' | 'none' | 'avatar' | What sits before the label in the button. |
| heading | string | 'Switch account' | Small caps title at the top of the list. Empty hides it. |
| align | 'start' | 'end' | 'start' | Side of the button the list lines up with. |
| height | number | 44 | Height of the button. |
| radius | number | 999 | Corner radius of the button. 999 makes a pill. |
| duration | number | 0.4 | Seconds the list takes to spring open. |
| bounce | number | 0.2 | Bounce of the springs. |
About Switcher Dropdown
Switcher Dropdown is the account or workspace picker apps keep in their top bar. Closed, it is a pill with the current item's avatar or initials, its name and a small plan badge. It opens into the same list as the library's selects: a spring-open card, rows that come in out of a soft blur, a highlight that glides to the hovered row and a black or white check on the chosen one. Rows can carry a description under the name, and a dashed plus row after a divider creates something new. The keyboard works as in a select (arrows, Home, End, Enter, Escape), and it runs controlled or uncontrolled.
What's included
- Pill with avatar or initials, name and plan badge
- List with descriptions and a gliding highlight
- Check on the chosen item, create row after a divider
- Avatar, list icon or no leading element
- Arrows, Home/End, Enter and Escape
- Controlled and uncontrolled value
- Light and dark look, respects reduced motion
- Type
- Animated React dropdown component
- Library
- Components · Dropdown
- Stack
- Next.js, React, Tailwind CSS, Framer Motion
- Added
- 2026-11-24
- Install
npx motionsnack add switcher-dropdown