Loading component…
Loading component…
Sphere of dots that breathes, reacts to loudness, collapses into a spinning ring while thinking and ripples while speaking
To reuse this local React demo, copy all files from the Code tab into the same folder, then import VoiceOrb from ./voice-orb.
import { VoiceOrb } from "@/components/ui/voice-orb";
export function VoiceMode() {
const { state, level, toggle } = useVoiceSession(); // "idle" | "listening" | "thinking" | "speaking", 0–1
return <VoiceOrb state={state} level={level} onPress={toggle} />;
}| Name | Type | Default | Description |
|---|---|---|---|
| state | "idle" \| "listening" \| "thinking" \| "speaking" | "idle" | What the assistant is doing – the orb melts from one state into the next |
| level | number | Loudness from 0 to 1 while listening or speaking. Without it the orb makes up a natural-looking level | |
| size | number | 220 | Edge length in px |
| dots | number | 520 | Number of dots – raise it for large sizes |
| accent | string | blue | Color the moving dots take on; resting dots use the text color |
| label | boolean \| Partial<Record<state, string>> | true | The line under the orb – false hides it, an object replaces single texts |
| interactive | boolean | true | Dots give way to the mouse pointer |
| onPress | () => void | Makes the orb a button, e.g. to start and stop listening | |
| className | string | Extra class on the root | |
| style | CSSProperties | Inline styles on the root – set color here to change the resting dots |
Fixed square of size px – pass a smaller size on phones; it is sharp on high-density screens
Touch screens: no pointer effect, the press works as usual
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"