Skip to content

Record Dialog

RecordDialog is the one dialog for a full record edited in a modal: the purchase order today, the change order and subcontract next. The frame (header, body, footer) and the rail are built once here, so every record modal has the same rail in the same order and a screen only supplies what goes in it.

Live demo

Open it, then try Send to client, Mark approved, Receive and Delete. Each opens inside the modal, not as a second dialog on the page, and Esc closes the top layer first. The component below is the real one the app ships.

The rail

The rail is a column of parts, always in this order: the filled total, progress (a StatusTimeline), the one companion card, then attachments and activity. A part a record has nothing for is left out; the order of the rest stays.

The same, on the dark theme:

Below 900px the rail moves under the main column, the total and the timeline share one sticky row at the top of the body (the timeline becomes the compact stepper), and the companion card collapses to its heading and a one-line summary.

Usage

Source: RecordDialog.tsx

import {
Dialog,
RecordDialogContent,
RecordDialogHeader,
RecordDialogBody,
RecordDialogMain,
RecordDialogRail,
RecordDialogTotal,
RecordDialogRailSection,
RecordDialogRailCard,
RecordDialogAttachments,
RecordDialogActivity,
RecordDialogFooter,
RecordDialogSheet,
StatusTimeline,
} from "@beacon/design-system";
<Dialog open={open} onOpenChange={setOpen}>
<RecordDialogContent aria-describedby={undefined}>
<RecordDialogHeader kind="Change Order · CO-2254-03" title="ASI-06 gym mezzanine" />
<RecordDialogBody>
<RecordDialogMain>…the record…</RecordDialogMain>
<RecordDialogRail label="Change order summary">
<RecordDialogTotal label="Change order total" amount="+$18,400.00" detail="3 lines" />
<RecordDialogRailSection title="Progress">
<StatusTimeline label="Change order status" steps={steps} />
</RecordDialogRailSection>
<RecordDialogRailCard title="Contract" summary="$1,200,000">…</RecordDialogRailCard>
<RecordDialogRailSection title="Attachments">
<RecordDialogAttachments items={files} />
</RecordDialogRailSection>
<RecordDialogRailSection title="Activity">
<RecordDialogActivity items={events} />
</RecordDialogRailSection>
</RecordDialogRail>
</RecordDialogBody>
<RecordDialogFooter destructive={…}>…</RecordDialogFooter>
<RecordDialogSheet open={sheet} onOpenChange={setSheet} title="Send to the client" footer={…}>
…
</RecordDialogSheet>
</RecordDialogContent>
</Dialog>

Put the timeline’s section second, right after the total: that is what lets the two share the sticky row below 900px.

Sheets and confirmations

  • Send, Mark approved, Receive are RecordDialogSheets with no steps: one form and a footer, sliding over the record inside the modal. A multi-step flow (import) gives it steps and current.
  • Delete is a ConfirmDialog. Inside a record dialog it dims only the modal; anywhere else it is a page-level alert dialog, so one call site works in both places.

Parts

PartPropsWhat it is
RecordDialogTotallabel, amount, detail (null for none)The filled total card.
RecordDialogRailSectiontitleA titled block of the rail.
RecordDialogRailCardtitle, summary, defaultOpen?The one companion card: contract, vendor. Plain above 900px, collapsible below.
RecordDialogAttachmentsitems: { id, name, detail, kind? }[]File rows with a type chip (PDF by default).
RecordDialogActivityitems: { id, avatar, who, text }[]Who did what, with an avatar of initials or an icon.
RecordDialogSheetopen, onOpenChange, title, steps?, current?, backLabel?, footer?A sheet over the record, inside the modal.