@elevenlabs/client, with a choice of circle, cloud, radial,
and bars themes, motion presets, and audio-reactive listening and speaking states.
Preview your ElevenLabs orb UI
Try the visual themes before connecting an agent. Select listening to preview input response or speaking to preview output response. These are simulated signals: no microphone, account, or live ElevenLabs session is needed.
Open the theme preview in a separate page.
The preview includes all orb-ui states; the ElevenLabs adapter normally transitions directly from
listening to speaking rather than emitting a separate thinking state.
Choosing an orb for ElevenLabs
ElevenLabs UI’s Orb is a Three.js visualization with customizable gradient colors, an animation seed, agent states, and input/output volume controls. It is a good fit when you want that visual treatment and the ElevenLabs UI component workflow. orb-ui is an independent alternative for the visual layer. Choose it when you want several different theme designs, theme-specific motion presets, or the same React component API across ElevenLabs and other voice providers. Both offer appearance customization; the difference is the available designs and integration approach, not whether you can change a color.
Your agent configuration, voice, and ElevenLabs usage remain with ElevenLabs. orb-ui provides the
React interface; it does not replace the voice service. The two libraries have different props,
so switching the visual layer requires updating the component wiring.
Install
Install both orb-ui and the ElevenLabs client package used by the adapter:Connect a public ElevenLabs agent
Create a voice agent in ElevenLabs and replaceyour-agent-id below. Run on HTTPS or localhost so
the browser can request microphone access. Allow your app’s domain if you use agent domain
restrictions. This complete React component keeps one adapter for each mounted agent, displays
status and errors, and ends the session when it unmounts.
adapter={adapter} instead of signal
and use an interactive theme with an aria-label.
For private agents, pass the server-generated signedUrl or conversationToken option that your app already gives to Conversation.startSession().
Choose the session credential
The adapter accepts the same mutually exclusive session shapes that the ElevenLabs client uses:agentIdfor a public agent, with an optionalconnectionTypesignedUrlfor a private WebSocket sessionconversationTokenfor a private WebRTC session
startSession options through to the client, but
text-only sessions are intentionally outside orb-ui’s voice UI contract.
ElevenLabs voice orb state mapping
The ElevenLabs adapter maps the session into these orb-ui states:- idle
- connecting
- listening
- speaking
- error
inputVolume while listening, and output levels are emitted
as outputVolume while speaking. Separate shipped profiles map both into the same stable 0–1 speech
envelope. The adapter accepts directional calibration overrides and diagnostic callbacks for custom
audio paths; see volume calibration.
The ElevenLabs mode surface does not expose a separate thinking event through this adapter, so the
normal transition is listening to speaking. If your application has an authoritative processing
state from another source, use controlled mode and include it in the signal you pass to Orb.
Session ownership
createElevenLabsAdapter owns Conversation.startSession() and endSession(). When an interactive
theme is activated, Orb calls the adapter’s start() or stop() method. The adapter installs the
required callbacks, polls both volume directions during the active turn, and clears that polling
when the session ends or the last subscriber is removed.
The complete example above keeps the orb passive and puts those actions on labeled buttons. If
your app already owns an active ElevenLabs session, use controlled mode below instead of creating
an adapter that would open a second session.
Theming
Usecircle for a compact orb, cloud for an atmospheric sphere, radial for distinct human and
agent motion, or bars for a waveform-style visualization. In the complete example above, replace
the Orb with either of these alternatives, keeping the same signal and session controls:
<button type="button"> controls, so they work with keyboard activation and accept forwarded attributes like id, data-*, and aria-label.
Controlled mode
If your app owns more of the ElevenLabs session lifecycle, pass a signal directly.Troubleshooting
The orb stays on connecting. Confirm thatConversation.startSession() resolves and that the
browser can reach the agent. For private agents, mint a fresh credential and verify that its
connection type matches the credential shape.
The orb moves for only one side. Both directional envelopes stay current, but Orb renders
input volume while the normalized state is listening and output volume while it is speaking.
Confirm that ElevenLabs mode-change callbacks are arriving and that the browser granted microphone
access.
A stopped session still updates the UI. Keep one adapter instance per active configuration and
let React remove its subscription on unmount. If a credential or agent changes, stop the old
adapter before replacing it.
Production checklist
- Private credentials are minted on an authenticated, rate-limited server endpoint.
- The adapter is created with exactly one of
agentId,signedUrl, orconversationToken. - Microphone denial and session errors have visible recovery copy outside the orb.
- Separate call controls use
interactive={false}on the visualization. - Start, stop, and restart are tested without leaked listeners or volume polling.
- A text status or transcript makes the conversation understandable without animation.