Skip to content
Back

Reply draftPro

Drafts an answer below an incoming email: a quick-reply chip sets the direction, tone and length controls redo it in one fade, and you can edit the result before inserting it.

oxyn add reply-draft
MI
Mara Ilvesmara@fernhill.studio
Today 09:41

Moving our kickoff to next week?

Hi! Our designer is out sick until Monday, so Thursday's kickoff would be a bit thin on our side.

Could we move it to Tuesday or Wednesday next week? Happy to keep the same time.

Claude Sonnet 4.5Drafting
⌘ Enter to insert
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • Answer an email fast: quick replies steer a fresh draft, tone and length rewrite it, the draft can be edited, and Insert hands it over.

When not to use

Installation

Reply draft is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add reply-draft

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Drafting

The first draft streams in.

MI
Mara Ilvesmara@fernhill.studio
Today 09:41

Moving our kickoff to next week?

Hi! Our designer is out sick until Monday, so Thursday's kickoff would be a bit thin on our side.

Could we move it to Tuesday or Wednesday next week? Happy to keep the same time.

Claude Sonnet 4.5Drafting
⌘ Enter to insert
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Formal long

A long, formal draft with earlier drafts to restore (Oxyn extra).

MI
Mara Ilvesmara@fernhill.studio
Today 09:41

Moving our kickoff to next week?

Hi! Our designer is out sick until Monday, so Thursday's kickoff would be a bit thin on our side.

Could we move it to Tuesday or Wednesday next week? Happy to keep the same time.

Claude Sonnet 4.5Drafting
⌘ Enter to insert
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Empty

No draft yet: Draft a reply.

MI
Mara Ilvesmara@fernhill.studio
Today 09:41

Moving our kickoff to next week?

Hi! Our designer is out sick until Monday, so Thursday's kickoff would be a bit thin on our side.

Could we move it to Tuesday or Wednesday next week? Happy to keep the same time.

Claude Sonnet 4.5No draft yet
⌘ Enter to insert
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

ReplyDraft

PropTypeDefaultDescription
nowrequiredClockMs—Host clock.
autostartbooltrueStart the first draft on mount.
toneusizeDefault::default()Starting tone (0 friendly, 1 concise, 2 formal).
lengthusize1Starting length (0 short, 1 medium, 2 long).
historyboolDefault::default()Show the draft history (Oxyn extra).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabQuick replies, the draft, tone, length, Regenerate, Insert
Arrows · HomeorEndIn tone or length, move and rewrite
EnterorSpaceActivate a quick reply or button
Cmd/CtrlEnterInsert the finished draft from anywhere in the card

Accessibility

  • An article labelled with the sender; the reply area is a labelled section with aria-busy while drafting.
  • Quick-reply chips report their pressed state; tone and length each take one tab stop and move by arrow keys.
  • The finished draft is an editable text box; Insert takes the edits.
  • Drafting, rewriting, ready and inserted are spoken, and the demo notes that no email left.
From the spec

Tone and length are radio groups; the draft is a labelled textbox while editing; Insert announces itself. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.

Motion & interaction

Quick replies start a new draft; tone (Friendly, Concise, Formal) and length (Short, Medium, Long) rewrite with one crossfade. Cmd/Ctrl+Enter inserts.

Timing

Everything on screen is derived from the host clock now (no timers in the component), so playback, tests and the GPUI view agree.

TransitionDurationEasing
Think500 ms (THINK_MS)—
Stream34 ms per word ticklinear
Rewrite crossfade180 msease-out

Reduced motion: streamed text and moves appear at their end state; progress still advances, without travel animation.

Responsive behaviour

  • Fills up to 600 px; under 480 px the padding drops and the body loses its avatar indent.
  • Chips and both control groups wrap onto new lines; below 460 px the separator between them goes.
  • The draft box reserves its height, so a rewrite never jumps.
Edge cases (spec)

The received-message header keeps the sender name visible: the name truncates last, the time shrinks first. Long drafts scroll inside the card. Checked at 1440, 768 and 390 px in light and dark with no text overlap. Chrome is monochrome grey; colour is semantic only (success, warning, danger, info) plus the providers' coloured brand marks.

Notes for AI

  • Import ReplyDraft from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: AiKitView in oxyn_gpui.
  • Props to set first: now.
  • It reads a clock (now) for live timers; pass one clock for the whole page rather than one per component.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI