Compose

Writing an email, from Compose (C) or Forward (F). A modal on Glass/Overlay with Yöte fields.

New and forward

A modal stays centred, so it scales from the middle (0.96 and opacity) instead of from a trigger, and the bg/scrim backdrop fades: 200ms in, 150ms out. Send needs someone to send to. draft fills it, the way Forward brings the subject and the original message.

Usage

import { ComposeDialog } from "@kuori/ui/inbox";
<ComposeDialog open={open} onOpenChange={setOpen} onSend={send} />

ComposeDialog

PropTypeDescription
openRequired
boolean
Whether it shows
onOpenChangeRequired
(open: boolean) => void
Esc, the ×, Discard and clicking outside close it
onSendRequired
(draft: Draft) => void
Called with to, subject and body
title
string
“New email” or “Forward”Default: New email
draft
Partial<Draft>
What it opens with