Xzero UI
Pro library

Inbox sidebarPro

A mail sidebar whose Compose button grows into a composer and whose folders take dropped mail.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui-pro/inbox-sidebar
Live · keyboard ready

Variant: Inbox

A mail sidebar whose Compose button grows into a composer and whose folders take dropped mail.

Use this as the shell of a mail or messaging app. Load folders, labels, and messages from your mail API, persist moves and stars through it, and connect Send and drafts to your outbox; sending and saving in the preview are simulated.

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui-pro/inbox-sidebar

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { InboxSidebar } from "@/components/xzero/blocks/inbox-sidebar/inbox-sidebar";

export default function MailPage() {
  return (
    <InboxSidebar
      onCollapsedChange={(collapsed) => localStorage.setItem("mail-rail", String(collapsed))}
    />
  );
}

API reference

InboxSidebar

A mail shell with folders, labels, a message list you can drag onto folders, row quick actions, and a Compose button that grows into a composer. Folders, messages, and sending are simulated.

PropTypeDefaultDescription
defaultCollapsedbooleanfalseStart with the sidebar collapsed to its icon rail.
onCollapsedChange(collapsed: boolean) => void–Called when the sidebar collapses or expands, from the toggle or the [ shortcut.

Keyboard interactions

KeysAction
[Toggles the icon rail when focus is not in a text field, menu, or dialog.
EOn a message row, archives or moves it with its quick action.
SOn a message row, toggles the star.
Cmd/Ctrl+EnterSends from the composer.
EscapeCloses the composer and saves a draft, or cancels a drag in progress.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Related

Browse all components