App Shells & Panels

Inbox Split View

A mail inbox with a list plus a reading pane, a sliding selection highlight, and unread badges.

This is a WebberUI Pro component

The install command below needs a licence to run; without one it returns 401.

How to install Pro components →See the plans →

The classic mail inbox split view: on the left, a message list with sender initial avatars, unread dots, and star indicators, where the selection highlight bar glides smoothly between items using layoutId; on the right, a reading pane that switches message content with AnimatePresence, with a toolbar that supports starring and archiving (archiving selects the adjacent message automatically).

Bring this into your project

Run this command in your project folder. The CLI adds the source and dependencies; then follow the usage example below.

npx webberui@latest add "https://webberui.com/r/inbox-split-view.en.json?t=<install token>"

New project or installation trouble? Start here →

Playground

Tune the props live — the code snippet updates as you go, so you can dial in the look you want before copying it.

360
Active edited usageDefault props
<InboxSplitView/>

The complete example includes the preview layout and data. Install the component first, then paste this file into your project.

Installation

npx webberui@latest add "https://webberui.com/r/inbox-split-view.en.json?t=<install token>"

Or, once registries are configured in components.json, install it as @webberui/inbox-split-view.

Usage

import { InboxSplitView, type InboxEmail } from "@/components/ui/inbox-split-view";

const emails: InboxEmail[] = [
  {
    id: "1",
    sender: "Grace Lin",
    subject: "Draft of the Q3 product roadmap for review",
    preview: "Hi, attaching the first draft of this quarter's roadmap…",
    time: "9:24 AM",
    unread: true,
    body: ["Hi, attaching the first draft of this quarter's product roadmap — please give it a read."],
  },
];

<InboxSplitView
  emails={emails}
  onArchive={(email) => console.log("archived", email.id)}
  onToggleStar={(email, starred) => console.log(email.id, starred)}
/>

Props

InboxSplitView

PropTypeDefaultDescription
emailsInboxEmail[]—Initial message data; the component manages read / starred / archived state internally
defaultSelectedIdstringthe first message's idThe id of the message selected by default
titlestring"Inbox"Inbox title text
heightnumber420Panel height (px); the list and the message body scroll independently
onArchive(email: InboxEmail) => void—Fires when a message is archived
onToggleStar(email: InboxEmail, starred: boolean) => void—Fires when the star is toggled; starred is the state after the toggle
classNamestring—Forwarded to the outer container

InboxEmail

PropTypeDefaultDescription
idstring—Unique identifier
senderstring—Sender name; the avatar takes its first character
subjectstring—Message subject
previewstring—Preview snippet in the list (truncated to one line)
timestring—Display time string, for example "9:24 AM"
bodystring[]—Body paragraphs for the reading pane
unreadbooleanfalseWhether it is unread (marked read automatically once selected)
starredbooleanfalseWhether it is starred

Accessibility

  • The message list uses role="listbox" with role="option", marks the selected item aria-selected, and supports up / down arrow keys to switch messages
  • The star button expresses its toggle state with aria-pressed, and both the star and archive buttons have Chinese aria-labels
  • The unread dot carries aria-label="Unread", and unread messages are also distinguished by bold weight, not by color alone
  • When the user has "reduce motion" enabled at the system level, the highlight bar's slide, the list reflow, and the pane switch animations all become instant changes
  • Sender initial avatars are decorative and hidden from assistive technology with aria-hidden