Genesis
@beta

InboxLayout

InboxLayout — the 3-pane inbox on the web: views (Mine, Unassigned, All), a list of conversations, the open thread, and a context sidebar (who it's from, properties, linked work). It only positions its panes: fill them with `InboxViews`, `InboxPage` and `ThreadPage` (or the app's own), and keep which conversation is open where the app keeps it, its router's URL param. On narrow screens it shows one pane at a time, like the phone: the list, or the thread with a Back button (`onBack`) when `threadOpen`. The views rail shows from `lg` up; below that, a button over the list (with `activeViewLabel`) opens the same views in a sheet, which closes when one is chosen. The context sidebar toggles: controlled (`contextOpen` / `onContextOpenChange`), or on its own, remembered per viewer under `contextStorageKey`. From `xl` up it sits beside the thread; below that, it opens as a sheet over it, only when the toggle asks. The toggle sits in a row over the thread; to put it in your own header and spend no row on it from `md` up, pass `thread` as a function: it gets `{ contextToggle }`. Keyboard (`shortcuts`): each key is a callback the app can leave out. They work only while focus is inside the layout, and never while typing in a field or inside a dialog, menu, list box, grid or tree. j / k: next and previous conversation; r: reply; n: internal note; e: solve or close; a: assign; Escape: back. To let people turn single-key shortcuts off (WCAG 2.1.4), keep a setting and pass `shortcuts={undefined}` when it's off. On the server, and in the first render on the client, the layout is narrow and the sidebar at its default, so hydration matches; the viewport and the remembered setting apply right after. Tailwind has to see this package's classes: import `@marktiderman/genesis-ui/styles.css`, or add `@source "../node_modules/@marktiderman/genesis-ui/dist";` to your CSS.

packages/ui/src/components/patterns/messaging/inbox-layout.tsx

Import
Subpath export: @marktiderman/genesis-ui/patterns
import { InboxLayout } from "@marktiderman/genesis-ui/patterns";
Components
Auto-generated from TypeScript source via react-docgen-typescript.

InboxLayout

PropTypeDefaultDescription
list*ReactNode—The list of conversations (an `InboxPage`).
activeViewLabelstring—The chosen view's name, on that button ("Mine").
classNamestring—
contextReactNode—Beside the thread from `xl` up, a sheet below: who it's from, its properties, linked work.
contextOpenboolean—Whether the context sidebar is open (controlled).
contextStorageKeystring—Uncontrolled: remember open or closed in this browser under this key.
defaultContextOpenbooleantrueUncontrolled: open at first. Default true.
labels{ views?: string; list?: string; thread?: string | undefined; context?: string | undefined; back?: string | undefined; toggleContext?: string | undefined; } | undefined{}Words the layout says.
onBack(() => void)—Back to the list on narrow screens. Without it, no Back button shows.
onContextOpenChange((open: boolean) => void)—
shortcutsInboxShortcuts—
testIDstringinbox-layout
threadReactNode | ((parts: { contextToggle: ReactNode; }) => ReactNode)—The open conversation (a `ThreadPage`), or what shows when none is open. As a function, it gets the Details toggle to place in its own header (a `headerRegion`), and the layout's row over the thread is only for Back, on narrow screens.
threadOpenbooleanfalseA conversation is open: on narrow screens the thread shows instead of the list.
viewsReactNode—The views rail (`InboxViews`) from `lg` up, and a sheet from a button over the list below it.