Email draft preview

Email draft

Agent-written email for review – switch recipient and tone, edit inline, remove the attachment, send or discard with undo

  • Group
    Agents
  • Origin
    Copied · affectUI · source
  • License
    MIT
  • Added
    Oct 18
npx shadcn@latest add @deank/email-draft

The registry stays private. Install from the repo with a GitHub token — see the README.

Usage

import { EmailDraft } from "@/registry/components/email-draft/email-draft";

<EmailDraft>Label</EmailDraft>

Props

NameTypeDefaultDescription
referencestring"SUB-1182"Reference of the record the email is about
accountstring"Northwind Logistics"Account or company under the reference
amountstring"$8,900"Amount on the right
statusstring"Renews in 5 days"Status chip next to the reference
agentstring"Renewal agent"Who wrote the draft, shown in the footer
contactsDraftContact[]People the email can go to – the first is preselected
attachmentstring | nullFile name of the attachment; it can be removed and added back
tonesDraftTone[]Text variants { id, label, body(contact) } – Friendly, Short and Formal by default
link{ label, href }Link appended to the email text
onSend({ to, body, attachment }) => voidCalled after Send with the final email
onDiscard() => voidCalled when the draft is discarded
classNamestringExtra class on the root

When to use

- Human-in-the-loop flows where an agent drafts an email and someone approves it – renewals, reminders, follow-ups - Inboxes or task lists of pending outreach, one card per record

When not to use

A full email client or composer.

Related

Decision inbox · Message actions · Smart recommendation