Skip to Content
Components

Draft review

An email the agent drafted, to check and edit before it sends.

An email the agent drafted, laid out like the email it is: who it goes to, the subject, the body and any attachments. Check and edit it, then send now or later — the menu beside the button picks when — or discard it. A warning can stop it before it sends, like an attachment the message mentions but nothing attached, and after sending there is a short window to undo. The phase drives what the footer shows.

Preview
Draft from the agentAfter the pricing review with Maya
Not sent
ToMaya Kim
Hi Maya, Here's what changed on the pricing page: one button per plan, the yearly price first, and the FAQ under the comparison table. The full list is in the attached summary. Ready for your sign-off when you are.

Usage

<!-- include core.css + draft-review.css -->
<div class="dm-drf dm-panel">
  <div class="dm-drf-h">
    <span class="dm-drf-ag"><!-- spark --></span>
    <div class="dm-drf-ht"><b>Draft from the agent</b><span class="dm-muted">After the pricing review</span></div>
    <span class="dm-tag dm-drf-tag">Not sent</span>
  </div>
  <div class="dm-drf-b" contenteditable="true" role="textbox" aria-label="Message">Hi Maya, …</div>
  <div class="dm-drf-f">
    <button class="dm-pill dm-ghost dm-sm">Discard</button>
    <span class="dm-sp"></span>
    <div class="dm-drf-mg">
      <button class="dm-pill dm-primary dm-sm dm-drf-go">Send</button>
      <button class="dm-pill dm-primary dm-sm dm-drf-dd" aria-label="When to send"><!-- chev-d --></button>
    </div>
  </div>
</div>

Properties

NameTypeDescription
titlestringThe bold first line. Defaults to "Draft from the agent".
subtitlestringThe quieter line under the title.
toDraftRecipient[]Who it goes to: { name; initials?; color? }.
subjectstringThe subject line. Editable when onSubjectChange is set.
bodystringThe message as the agent wrote it. Stays editable; read edits from onBodyChange.
attachmentsDraftAttachment[]Files on the draft: { name; size?; loading? }.
warning{ text; actions }A problem to settle before it sends, with its own buttons.
phasedraft | sending | undo | sent | scheduled | discardedDrives what the footer shows.
sendOptionsSendOption[]The "when to send" menu: { key; label; detail? }. now sends straight away.
sendOption / defaultSendOptionstringThe picked option's key, controlled or uncontrolled.
undoLeftnumberSeconds left to undo, shown while the phase is undo.
onSend(option) => voidCalled when Send (or Schedule) is pressed, with the chosen option.
onDiscard() => voidCalled by the Discard button.
onUndo() => voidTakes it back: undoes a send, cancels a scheduled one, or brings back a discarded draft.

Theming

Works in light and dark (data-theme="dark") and in the Soft style (data-style="soft"). The card sits on a surface with the card shadow; the warning uses the warn tint, a sent draft the ok tint, and a scheduled one the blue "preview" tint — all from the theme tokens. In Soft the card, chips and pills are rounder.

On this page