Skip to content

Patterns

The inbox screen

An inbox screen puts a list of conversations or documents beside the one that is open: the list in a 24rem column, the thread in the rest, each scrolling on its own, with the composer under the thread and outside its scroll. Below 1024px an open thread covers the list and its subject becomes the page's title, with the way back above it.

By Bohuslav PoláčekChecked

packages/kit/src/components/screen.tsx
export type InboxScreenProps = Base & {
  archetype: "inbox";
  /** The list, with the next step on each row. */
  list: ReactNode;
  /** The composer under the thread. */
  composer?: ReactNode;
  itemOpen?: boolean;
  /** The thread or the document. */
  children: ReactNode;
};
The inbox screen's slots in the kit, read from the repository when the site was built.

Anatomy

  • Header (header): the mailbox's name. Below 1024px, while a thread is open, Foldline swaps it: the thread's subject becomes the title and a ghost "Back to mail" button the eyebrow, so the screen keeps one h1.
  • List (list, required): the threads, with the next step on each row. Riverside's rows carry a face, the subject, the channel, the booking and who has it; Foldline's the job's number and stage, and its unread rows are bold with a dot and the word for screen readers.
  • Thread (children): the conversation or the document that is open.
  • Composer (composer): the reply, the kit's Composer with the send button inside. At Foldline Cmd/Ctrl+Enter sends, because mail goes out for good and a stray Enter must not send half a sentence; a template fills the box and never sends.
  • itemOpen: true while an open thread covers the list on a phone.

Width, scroll and how a record opens

The screen runs full width. The list column is 24rem (384px) from 1024px, 8px from the thread, and each scrolls on its own while the page never does. The composer sits under the thread, outside its scroll, so the reply stays in reach however long the thread grows. A record opens in the thread (decision 0001): the open item is the thread itself, beside the list.

Under 1024px one pane shows at a time: the list, or with itemOpen the thread, its subject as the title and the way back above it. On a screen with room the inbox arrives with a thread already open (shared/preselect.tsx). Foldline opens the first unread enquiry without a job, else the first unread, else the first thread, and opening a thread reads it, so the open one never shows as unread. A phone opens on the list.

One type for mail, chat and a handbook

Four example apps use the type, each for a different job:

  • Foldline's mail: the print shop's shared mailbox, where every thread belongs to its job. Filters: Inbox, Unread, No job, Archive.
  • Riverside's messages: everything members write to the club, by e-mail, the web form or SMS, in one shared inbox at the reception; the type's sample in the runtime audit.
  • Juniper's handbook: the page tree as the list and the page as the document, with a picker above the page on a phone.
  • Brightpath's chat: the channels as the list; on a phone the top bar's step back returns to them.

What they share is the shape: something to pick on the left, the picked thing on the right, and the place to write under it.

The rules and where they are enforced

What AI coding tools build instead

  • A chat page that scrolls as a whole. The reply box scrolls away with the history, or a fixed box covers the last message. Here the composer sits outside the thread's scroll.
  • An empty pane on arrival. "Select a conversation" is a wasted first screen; the inbox arrives with a thread open.
  • Two squeezed panes on a phone. Here the open thread covers the list and takes the title.
  • Unread by colour alone. Bold, a dot and a word for screen readers.
  • A textarea above a row of buttons. The manifest lists exactly that, with "a hand-built chat input", as what Composer replaces.

Screens of this type

Example apps with an inbox

Which example apps render an inbox, and the record flows each one uses.Read from the demo's source when the site was built: 4 of 9 example apps render a <Screen archetype="inbox">. Side panel first means RecordPeek, the decision card ApprovalPanel, the history AuditTimeline.

How Foldline's mail fills the slots

apps/demo/src/modules/print/pages/mail.tsx
  header={header}
  list={list}
  itemOpen={covering}
  composer={
    openThread ? (
      <ThreadReply thread={openThread} initialTemplate={params.get("sablona")} onChange={changeThread} />
    ) : undefined
  }
>
  {wide && openId ? <PreselectParam name="vlakno" value={preselected?.id} /> : null}
  {openId ? (
    <AsyncState
      resource={thread.resource}
      onRetry={thread.reload}
      loading={<ThreadSkeleton />}
      isEmpty={(item) => !item}
      empty={null}
    >
      {(item) =>
        item ? <ThreadView key={item.id} thread={item} onChange={changeThread} headless={covering} /> : null
      }
    </AsyncState>
  ) : wide && resource.status === "success" ? (
    // Below 1024px the thread pane is hidden until a thread is open, so it holds nothing then.
    <div className="flex min-h-80 flex-1 items-center justify-center p-6">
      <EmptyState
        icon={<IconInbox aria-hidden="true" />}
        title={tx("Žádné vlákno k otevření", "No thread to open")}
        description={tx("Až nějaké přijde, otevře se tady.", "When one arrives, it opens here.")}
      />
    </div>
  ) : wide ? (
    <ThreadSkeleton />
  ) : null}
</Screen>
Foldline's mail: a header that becomes the thread's subject on a phone, the list, itemOpen while a thread covers it, the reply as the composer, and what shows when no thread is open.

Questions

Is a chat screen an inbox?

Yes. Brightpath's channels, Riverside's messages, Foldline's mail and Juniper's handbook use the same type: a list beside the open item, each scrolling on its own, with a composer where people write.

What does the inbox show when it opens?

On a screen with room, a thread is already open: at Foldline the first unread enquiry without a job, then the first unread, then the first thread. On a phone the list comes first.

Where does the reply box go in an inbox?

Under the thread and outside its scroll, so it stays in reach however long the thread grows, on a desktop and on a phone.

When is an inbox a work queue instead?

When each item ends in a decision rather than a reply. Kestrel's documents are accepted or returned, so they are a work queue with a decision pane, while Foldline's mail is answered, so it is an inbox.

Two ways

Build it yourself, or have it built

  • Build it yourself

    Build your app on the framework

    Get the codebase these apps stand on and build yours with Claude Code, Cursor or Codex.

    One payment, lifetime updates

    Get the framework
  • Have it built

    Have us build your app

    Tell us how your team works. We plan the app with you and build it on the same framework at a fixed price.

    After launch, Care keeps it improving, from €99 a month.

    from €1,990

    Describe your app