Orb component API
Orb is the main orb-ui component. It can run in controlled mode with explicit state and volume props, or through a provider adapter.
import { Orb } from 'orb-ui'
;<Orb state="listening" volume={0.4} theme="circle" size={240} />
Props
| Prop | Type | Default | Description |
|---|
state | OrbState | adapter state or idle | Current voice agent state. In controlled mode, pass this directly. |
volume | number | adapter volume or 0 | Audio volume from 0 to 1. In controlled mode, pass this directly. |
adapter | OrbAdapter | none | Provider adapter that subscribes to state and volume updates. |
theme | OrbTheme | debug | Visual theme: debug, circle, or bars. |
size | number | 200 | Component size in pixels. |
className | string | none | Optional class name for the rendered theme. |
style | React.CSSProperties | none | Optional inline styles for the rendered theme. |
disabled | boolean | false | Disables clickable themes and debug start/stop controls. |
id | string | none | Forwarded to the rendered orb control/container. |
data-* | string/primitive | none | Forwarded to the rendered orb control/container, useful for tests. |
aria-label | string | generated when needed | Accessible label for clickable circle and bars controls. |
onStart | () => void | adapter start | Start handler used by the debug theme and clickable themes. |
onStop | () => void | adapter stop | Stop handler used by the debug theme and clickable themes. |
States
type OrbState = 'idle' | 'connecting' | 'listening' | 'speaking' | 'error'
Use these states consistently across providers so your product has one voice UI language even when the underlying SDK changes.
Themes
type OrbTheme = 'debug' | 'circle' | 'bars'
debug: visible state and start/stop controls while integrating.
circle: the primary animated voice orb.
bars: waveform-like audio activity.
When an adapter or onStart/onStop handler is provided, circle and bars render as <button type="button"> controls with native keyboard activation. If there is no visible label, pass aria-label.
Adapter interface
interface OrbAdapter {
subscribe(callbacks: {
onStateChange: (state: OrbState) => void
onVolumeChange: (volume: number) => void
}): () => void
start?: () => void | Promise<void>
stop?: () => void | Promise<void>
}
Adapters normalize provider SDK events into orb-ui state and volume. If a provider is not supported yet, use controlled mode first and turn that mapping into an adapter later.
Last modified on June 5, 2026