Reply draft
An AI-written reply under the message it answers. The draft streams in, names what it was based on, and becomes an ordinary editable field when it is done; edits are marked so nobody mistakes them for the AI's.
Dana Whitfield9:41 Charged twice for March
Hi, I was charged twice for my March invoice (#4812). Can you refund the duplicate? Thanks, Dana
When to use
- Helpdesks, inboxes and CRMs where most replies follow known answers.
- Any reply a person should read and send, rather than the AI sending it.
When not to use
- Sending without review; this part always ends with a person pressing Send.
- Long documents; use AI inline edit, which works paragraph by paragraph.
Installation
pnpm dlx shadcn@latest add @caliper/reply-draft
Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
ReplyDraft
11 props
Keyboard
- Enter
- Activates the focused control.
- Escape
- Closes or cancels, then returns focus to where it came from.
Accessibility
It exposes alert and status semantics, with aria-label, aria-hidden, aria-describedby and aria-keyshortcuts kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/reply-draft.mdThe index of every part is at /llms.txt.