---
title: "Mail Sidebar N.01"
description: "The sidebar of a mail app: an account switcher, compose on C, mailboxes with unread counts, labels, other accounts, and storage. It collapses to an icon rail."
url: https://gelatinui.com/blocks/mail-sidebar-01
markdown_url: https://gelatinui.com/blocks/mail-sidebar-01.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/mail-sidebar-01"
version: "2026-11-16"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Mail Sidebar N.01

> The sidebar of a mail app: an account switcher, compose on C, mailboxes with unread counts, labels, other accounts, and storage. It collapses to an icon rail.

Page: https://gelatinui.com/blocks/mail-sidebar-01

## When to use it

Best for: The nav of a mail app: compose, mailboxes with unread counts, labels, other accounts, and storage.

- Use it as the frame of a mail, inbox, or support app.
- Pass your words through `content`. Start from `MAIL_SIDEBAR_01_DEFAULT_CONTENT`, and change the fields you need.
- Give each account a `mark` with the logo of its provider, and the app a `mark` with your logo.

## When not to use it

- For the nav of an app with workspaces and teams, use a [Sidebar](https://gelatinui.com/components/sidebar.md).
- For the parts with no ready contents, use a [Sidebar](https://gelatinui.com/components/sidebar.md).

## Notes for agents

- C presses Compose, unless a field, a menu, or a dialog has the focus. Pass `onClick` to `MailSidebar01Compose` to open your composer.
- ⌘B (Ctrl+B elsewhere), the rail, or the header button collapses it to a 48px icon rail. Scheduled, categories, labels, accounts, and storage hide there.
- A cookie keeps the state. Pass `cookie={false}` in a demo.
- Under 768px the panel is a left Drawer, and the page bar shows its button.
- `MailSidebar01Page` is only the page bar: put your message list under it, or replace it.
- To change the order or drop a part, pass the parts as children. With children, the block ignores `content`.

## Anatomy

```text
MailSidebar01
├─ MailSidebar01Account (0..n)
│  ├─ MailSidebar01AccountMenu (0..n)
│  └─ MailSidebar01AccountTrigger (0..n)
├─ MailSidebar01AppBadge (0..n)
├─ MailSidebar01Compose (0..n)
├─ MailSidebar01Contents (0..n)
├─ MailSidebar01Default (0..n)
├─ MailSidebar01LabelDot (0..n)
├─ MailSidebar01PageTrigger (0..n)
├─ MailSidebar01Page (0..n)
├─ MailSidebar01Panel (0..n)
│  └─ MailSidebar01Row (0..n)
└─ MailSidebar01Storage (0..n)
```

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| MailSidebar01 | `mail-sidebar-01` |  |  |  |
| MailSidebar01AccountMenu | `mail-sidebar-01-account-menu` |  |  |  |
| MailSidebar01AccountTrigger | `mail-sidebar-01-account-trigger` |  |  |  |
| MailSidebar01Account | `mail-sidebar-01-account` |  |  |  |
| MailSidebar01AppBadge | `mail-sidebar-01-app-badge` |  |  |  |
| MailSidebar01Compose | `mail-sidebar-01-compose` | `data-collapsible` |  |  |
| MailSidebar01Contents | `mail-sidebar-01-contents` | `data-collapsible` |  | `hit-area` |
| MailSidebar01Default | `mail-sidebar-01-panel` |  |  |  |
| MailSidebar01LabelDot | `mail-sidebar-01-label-dot` |  |  |  |
| MailSidebar01PageTrigger | `mail-sidebar-01-page-trigger` | `data-state` |  | `motion-timing` |
| MailSidebar01Page | `mail-sidebar-01-page` |  |  |  |
| MailSidebar01Panel | `mail-sidebar-01-panel` |  |  |  |
| MailSidebar01Row | `mail-sidebar-01-row` |  |  |  |
| MailSidebar01Storage | `mail-sidebar-01-storage` | `data-collapsible`, `data-level` |  | `status-colors` |

## Usage

Render it with no props for the ready panel and the page bar.

```tsx title="mail-frame.tsx"
import { MailSidebar01 } from "@/components/blocks/pro/mail-sidebar-01/mail-sidebar-01";

export function MailFrame() {
  return <MailSidebar01 />;
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/mail-sidebar-01
```

It adds 60 registry items: 71 files, 11427 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Anchor](https://gelatinui.com/components/anchor.md)
- [Avatar](https://gelatinui.com/components/avatar.md)
- [Badge](https://gelatinui.com/components/badge.md)
- [Breadcrumb](https://gelatinui.com/components/breadcrumb.md)
- [Button](https://gelatinui.com/components/button.md)
- [Dot](https://gelatinui.com/components/dot.md)
- [Generated Avatar](https://gelatinui.com/components/generated-avatar.md)
- [Kbd](https://gelatinui.com/components/kbd.md)
- [Menu](https://gelatinui.com/components/menu.md)
- [Meter](https://gelatinui.com/components/meter.md)
- [Sidebar](https://gelatinui.com/components/sidebar.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Sidebar](https://gelatinui.com/components/sidebar.md)
- [Workspace Sidebar N.01](https://gelatinui.com/blocks/workspace-sidebar-01.md)
- [Meter](https://gelatinui.com/components/meter.md)
- [Menu](https://gelatinui.com/components/menu.md)

## Keyboard

| Keys | Action |
| --- | --- |
| C | Presses Compose. |
| ⌘B, Ctrl+B | Collapses or opens the panel. |
| Tab | Moves through the account, search, compose, the rows, and the storage link. |
| Esc | Closes the account menu or the Drawer. |

## Accessibility

The rows show a tooltip with the name on the icon rail.

The open mailbox has `aria-current="page"`, and the storage meter says its value in words.

## Motion

| Part | Motion |
| --- | --- |
| Rail | panel · the panel width changes |
| Drawer | sheet · the panel under 768px |
