Tone dial (Pro)
ProIncluded in $99Tone as a track the text follows: drag from formal to casual and the text rewrites itself, word by word.
On this page
ProSlide from formal to casual and the reply rewrites itself: shared words glide to their new places, changed words blur out and in.
Drag the thumb and the text rewrites itself at each stop: words both versions share glide to their new places, words that change blur out and in where they stand, and the paragraph eases to its new height. The thumb settles into stops on a spring. Give one version of the text per stop.
Installation
Needs chatcn Pro
This command works with a Pro license, along with every Pro component.
Or start free: sign up and get three Pro components on us, with a new one every month.
Usage
import { ToneDial } from "@/components/ui/chatcn/pro/tone-dial"
<ToneDial variants={[{ label: "Formal", text }, { label: "Casual", text }]} value={tone} onValueChange={setTone} />Props
| Prop | Type | Notes |
|---|---|---|
variants | { label, text }[] | One per stop, in order |
value / onValueChange | number | |
ends | [string, string] | Default Formal and Casual |
Keyboard
| Key | Action |
|---|---|
ArrowRight / ArrowUp | Next stop |
ArrowLeft / ArrowDown | Previous stop |
Home / End | First or last stop |
Accessibility
- A
role="slider"whose value text is the stop name; the text is a polite live region.
Motion
- Words are matched by longest common run; kept words move with a FLIP from their old box, new ones blur in 12 ms apart. Wrapping still happens at the spaces.
- Reduced motion: the text swaps in place.