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
openRequiredbooleanWhether it shows
onOpenChangeRequired(open: boolean) => voidEsc, the ×, Discard and clicking outside close it
onSendRequired(draft: Draft) => voidCalled with to, subject and body
titlestring“New email” or “Forward”Default:
New emaildraftPartial<Draft>What it opens with