Voice Orb

A tap-to-talk disc ringed by voice bars: listening, thinking, speaking and muted, each its own motion.

PROGet Voice Orb and 168 other Pro components with pro lifetime — Get Pro

Category
AI Chat
Access
Pro
Source
290 lines · one file
States
5 drawn

The decision inside it

Motion, not colour, tells the states apart

Each state is a different kind of movement, so the orb reads at a glance and in greyscale. The loop writes the bars' SVG attributes directly, costs no React renders, and stops when the orb is off screen or the tab is hidden.

When to use it

Use Voice Orb as the tap-to-talk button of a voice-first screen: a disc ringed by voice bars, idle, listening, thinking, speaking or muted, with your microphone or playback level driving the motion. Give it onClick to make it the talk and interrupt button.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Liro's Voice Orb for this.
Install it: npx shadcn@latest add @liro/voice-orb
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/voice-orb.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.

Usage

components/assistant-orb.tsx
import { VoiceOrb, type VoiceOrbState } from "@/components/ui/voice-orb";

export function AssistantOrb({ state, level, toggle }: { state: VoiceOrbState; level: number; toggle: () => void }) {
  return <VoiceOrb state={state} level={level} size={144} onClick={toggle} />;
}

API reference

“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

TypeNotes
stateVoiceOrbState YesWhat the assistant is doing.
levelnumber No0–1. Drives the bars while listening and the swell while speaking.
sizenumber NoDiameter in pixels, ring included. Default 160.
colors[string, string] NoThe disc's gradient and the bars, any CSS colours. Default the theme's info hue, deepened toward its ink.
iconColorstring NoThe icon in the disc. Default the theme's info foreground.
onClick() => void NoTap to talk or to interrupt. Makes the orb a button.
labelstring NoThe accessible name. Default describes the state, or the action when clickable.

Dependencies

npm packages

clsxframer-motionlucide-reacttailwind-merge

Liro foundations, installed alongside it

liro-theme

States

All of them are drawn by the component. None is left for you to design.

  • Idle
  • Listening
  • Thinking
  • Speaking
  • Muted

Accessibility

  • Keyboard reachable throughout, in visual order
  • Focus trapped in overlays, Escape closes them
  • Focus returns to whatever opened it
  • Live regions announce what changed, not that something did
  • Honours prefers-reduced-motion

Responsive behavior

  • Sizes to its container, not the viewport
  • Usable from 320px up
  • Pointer-based interaction, so trackpad and touch both work
  • No hover-only affordances