Skip to content
caliper ui pro docs

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.

Pro
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

terminal
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
PropTypeDefaultDescription
message *ReplyMessage—The message being answered.
draft *string—
onDraftChange *(draft: string) => void—
status *ReplyDraftStatus—
sourcesreadonly string[][]What the draft was written from, such as a help article or an order.
errorstring—Shown when status is "error".
onDraft *() => void—Asks the host for a new draft (first draft and Regenerate).
onStop(() => void)—
onSend *(draft: string) => void—
sendLabelstring"Send reply"
classNamestring—

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.md

The index of every part is at /llms.txt.

More in Assistant screens