Loading component…
Loading component…
Agent-written email for review
To reuse this local React demo, copy all files from the Code tab into the same folder, then import EmailDraft from ./email-draft.
import { EmailDraft } from "@/components/ui/email-draft";
export function RenewalReview() {
return (
<EmailDraft
reference="SUB-1182"
account="Northwind Logistics"
amount="$8,900"
status="Renews in 5 days"
agent="Renewal agent"
contacts={[{ name: "Jonas Weber", email: "jonas@northwind.io" }]}
attachment="Renewal-quote.pdf"
link={{ label: "Review quote", href: "/quotes/1182" }}
onSend={(email) => api.send(email)}
/>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| reference | string | "SUB-1182" | Reference of the record the email is about |
| account | string | "Northwind Logistics" | Account or company under the reference |
| amount | string | "$8,900" | Amount on the right |
| status | string | "Renews in 5 days" | Status chip next to the reference |
| agent | string | "Renewal agent" | Who wrote the draft, shown in the footer |
| contacts | DraftContact[] | People the email can go to – the first is preselected | |
| attachment | string \| null | File name of the attachment; it can be removed and added back | |
| tones | DraftTone[] | 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 }) => void | Called after Send with the final email | |
| onDiscard | () => void | Called when the draft is discarded | |
| className | string | Extra class on the root |
Fills its container up to 520px; on narrow screens the email address and the shortcut hint hide
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"
@import "tailwindcss"; in your main CSS file.