# Sidebar Settings Menu

> The account and settings menu at the foot of an app sidebar. The signed-in person is the trigger; the menu opens upward with their profile and plan, settings links, an inline Light/System/Dark switch, a language submenu, help links with an unread count, an upgrade card with a usage meter, and log out. Collapsed sidebars get an avatar trigger and a menu that opens sideways.

- Slug: `sidebar-settings-menu`
- Category: [Menus](https://www.assembli.design/category/menus.md)
- Type: component
- Tags: dropdown, sidebar, settings, account, theme
- npm dependencies: @base-ui/react, lucide-react
- shadcn/ui dependencies: none
- Live preview: https://www.assembli.design/preview/sidebar-settings-menu
- Page: https://www.assembli.design/components/sidebar-settings-menu

![Sidebar Settings Menu preview](https://www.assembli.design/thumbnails/sidebar-settings-menu-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `user` | `SettingsUser` | `DEFAULT_USER` |  |
| `usage` | `SettingsUsage` |  | Shows an upgrade card with a usage meter. Leave out for paid plans. |
| `collapsed` | `boolean` | `false` | Icon-only trigger for a collapsed sidebar; the menu then opens to the right. |
| `theme` | `SettingsTheme` |  |  |
| `defaultTheme` | `SettingsTheme` | `"system"` |  |
| `onThemeChange` | `(theme: SettingsTheme) => void` |  |  |
| `languages` | `SettingsLanguage[]` | `DEFAULT_LANGUAGES` |  |
| `language` | `string` |  |  |
| `defaultLanguage` | `string` |  |  |
| `onLanguageChange` | `(language: string) => void` |  |  |
| `unread` | `number` | `0` | Unread changelog entries, shown as a count on Help and Changelog. |
| `onAction` | `(action: SettingsMenuAction) => void` |  |  |

## Install

One-time setup (needs a subscription):

1. Add the registry to the project's `components.json`: `{"@assembli":{"url":"https://www.assembli.design/r/{name}.json","headers":{"Authorization":"Bearer ${ASSEMBLI_API_KEY}"}}}` (merge into `"registries"`).
2. Put an API key from https://www.assembli.design/account in `.env.local` as `ASSEMBLI_API_KEY=asm_…`.

Then install with the shadcn CLI (writes `components/sidebar-settings-menu/sidebar-settings-menu.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/sidebar-settings-menu
```

Registry item JSON: https://www.assembli.design/r/sidebar-settings-menu.json (send `Authorization: Bearer <api key>`)

## Code

> Component source needs an Assembli subscription ($12/month or $96/year) and an API key sent as `Authorization: Bearer <key>`. To get one without copying anything, POST https://www.assembli.design/api/agent/login (or call the MCP tool connect_account), show the user the link it returns, and poll https://www.assembli.design/api/agent/token for the key. Or subscribe at https://www.assembli.design/pricing and create a key at https://www.assembli.design/account.
