Skip to content
Back

Tone tunerPro

Adjust how a customer reply sounds: two sliders (how formal, how detailed) and three voice chips rework the message; only sentences that changed are swapped, words that are new compared with the draft can be highlighted, and Copy grabs whatever is showing.

oxyn add tone-tuner

To Jonah Reyes

Re: Charged twice in October

FormalityNeutral
CasualFormal
DetailStandard
BriefDetailed

Hi Jonah,

Thanks for letting us know about the double charge. We've refunded the extra $49 to your Visa ending in 4242. It should appear within 3 to 5 business days.

Let me know if you have any other questions.

Best, Priya

Original draft
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

  • Tune a reply to the right voice before sending: formal or casual, brief or detailed, friendly, confident or empathetic.

When not to use

Installation

Tone tuner 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 tone-tuner

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

Tour

Tours the voices until you touch it.

To Jonah Reyes

Re: Charged twice in October

FormalityNeutral
CasualFormal
DetailStandard
BriefDetailed

Hi Jonah,

Thanks for letting us know about the double charge. We've refunded the extra $49 to your Visa ending in 4242. It should appear within 3 to 5 business days.

Let me know if you have any other questions.

Best, Priya

Original draft
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 detailed

Formal and detailed, no tour (Oxyn extra).

To Jonah Reyes

Re: Charged twice in October

52 words changed
FormalityFormal
CasualFormal
DetailDetailed
BriefDetailed

Dear Jonah,

Thank you for letting us know about the duplicate charge. A refund of $49 has been issued to your Visa ending in 4242. Please allow 3 to 5 business days for it to appear. The duplicate resulted from an automatic retry during a brief outage at our payment provider; we have since added a safeguard to prevent a recurrence. Your next invoice, due on December 1, remains unchanged.

Please do not hesitate to contact us with any further questions.

Kind regards, Priya Nair, Billing

Rewritten · Neutral · Formal · Detailed
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

Failed

A failed rewrite keeps the last version.

To Jonah Reyes

Re: Charged twice in October

FormalityNeutral
CasualFormal
DetailStandard
BriefDetailed

Hi Jonah,

Thanks for letting us know about the double charge. We've refunded the extra $49 to your Visa ending in 4242. It should appear within 3 to 5 business days.

Let me know if you have any other questions.

Best, Priya

Original draft
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

ToneTuner

PropTypeDefaultDescription
nowrequiredClockMs—Host clock.
formalityusize1Starting formality (0 casual, 1 neutral, 2 formal).
detailusize1Starting detail (0 brief, 1 standard, 2 detailed).
voiceusizeDefault::default()Starting voice (0 neutral … 3 empathetic).
show_changesbooltrueHighlight words that are new compared with the draft.
tourbooltrueTour the voices until someone touches the card.
failboolDefault::default()Rewrites fail (error scenario).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabVoice chips, both sliders, Changes, Copy
← → · HomeorEndStep a focused slider through its three levels
EnterorSpacePress a chip, flip Changes, copy

Accessibility

  • The three voices are pressable chips inside a group labelled Voice.
  • Sliders are named and speak their level name (Casual, Neutral, Formal), not a number.
  • New words use mark elements and the header counts them, so changes never rely on colour.
From the spec

Chips are toggle buttons with aria-pressed in a group named Voice; sliders are role slider and speak their level name; changes are mark elements. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.

Motion & interaction

Changed sentences fade in place while unchanged ones stay put; new words against the original are marked when Changes is on and the header counts them. Pressing an active chip returns to neutral.

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
Debounce220 ms—
Rewrite650 ms—
Sentence swap180 ms fadeease-out
Tourevery 3.4 s—

Reduced motion: loops and travel stop; each state shows its end pose and its words.

Responsive behaviour

  • Up to 640 px; under 520 px the sliders stack and the chips share one row.
  • Each sentence keeps its place while it swaps, so the text never jumps.
Edge cases (spec)

The message keeps a minimum height so voices never make the card jump. Under 520 px the sliders stack and the chips share one row; under 400 px chip icons and the count hide. 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 official coloured brand and model marks.

Notes for AI

  • Import ToneTuner 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