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-draftMoving 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.
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.
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
- Replays a multi-agent run on one clock: use Agent timeline instead.
- One model at a glance: use Model card instead.
- A small automation on a single rail: use AI workflow instead.
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.
oxyn add reply-draftUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Drafting
The first draft streams in.
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.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Formal long
A long, formal draft with earlier drafts to restore (Oxyn extra).
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.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Empty
No draft yet: Draft a reply.
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.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
ReplyDraft
| Prop | Type | Default | Description |
|---|---|---|---|
nowrequired | ClockMs | — | Host clock. |
autostart | bool | true | Start the first draft on mount. |
tone | usize | Default::default() | Starting tone (0 friendly, 1 concise, 2 formal). |
length | usize | 1 | Starting length (0 short, 1 medium, 2 long). |
history | bool | Default::default() | Show the draft history (Oxyn extra). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Quick replies, the draft, tone, length, Regenerate, Insert |
| Arrows · HomeorEnd | In tone or length, move and rewrite |
| EnterorSpace | Activate a quick reply or button |
| Cmd/CtrlEnter | Insert 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.
| Transition | Duration | Easing |
|---|---|---|
| Think | 500 ms (THINK_MS) | — |
| Stream | 34 ms per word tick | linear |
| Rewrite crossfade | 180 ms | ease-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
ReplyDraftfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
AiKitViewinoxyn_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.