Conversation bar

A React component in Beamline's Voice & audio category.

The control bar of a voice call with an agent: one button to call and hang up, the agent's state as bars, a call timer, mute, and typing when talking is not an option. Works with any provider through one adapter, or with a session shared by the rest of the screen.

Use it for

  • The bottom bar of a voice-agent screen.
  • Adding a call to an existing assistant panel.

Not for

Anatomy

  • call / end button (one control: accent to call, danger to hang up, its handset tipping down between them)
  • agent state (bar-visualizer; dropped when the bar is narrower than 22rem, so the status words keep their room)
  • status and call timer
  • mute toggle
  • keyboard toggle (folds under 17rem during a call that hears you; stays whenever typing is the way)
  • message field and send (typing)
  • failure with fix and retry

Variants

  • variant: raised (floating pill, default), flat (inside a panel footer)

States

  • idle (call)
  • asking for the microphone
  • connecting
  • listening
  • thinking
  • talking
  • muted
  • reconnecting
  • typing
  • ended
  • error: blocked / no microphone / connection / service

Keyboard

  • Tab: call, mute, keyboard
  • Enter or Space on Call starts and on End hangs up
  • Keyboard opens the field (focus moves into it); Enter sends, Escape closes it and returns focus

Motion

The call button turns from call to hang up in place: its handset rotates 135° over --pui-duration-morph while its paint changes (the control changed at once). A new status fades in where the old one was; the typing field fades in where the state was. A failure or the microphone fallback grows in under the bar (.enter-grow), so what is below glides. Bars move only while connected and on screen; the timer ticks once a second only during a call.

Props

PropTypeDefaultDescription
sessionVoiceAgentSession—A session shared with the rest of the screen (useVoiceAgent).
adapterVoiceAgent—Or a provider: the bar then holds its own session.
agentNamestring"the agent"Used in labels ("Call Northline").
variant"raised" | "flat""raised"Legacy appearance setting; omitted by default. Deprecated: Use appearance instead.
allowTextbooleantrueOffer typing, during a call or instead of one. Default true.
placeholderstring"Type a message"Text shown before a value is entered or selected. Defaults to "Type a message".
onMessage / onError / onEndcallbacks—onMessage: Receives each message produced by the voice session; no handler by default. onError: Receives a reported capture, playback or provider error; no handler by default. onEnd: Runs when the voice session ends; no handler by default.
classNamesConversationBarClassNames—Classes for the named visual parts; no part overrides by default.
style / refCSSProperties / native Ref—style: Inline styles on the documented visual root; no inline overrides by default. ref: Receives the documented root element; no ref by default.
fieldRefRef<HTMLInputElement>—Receives the native field; no ref by default.
appearance"raised" | "flat"—Raised pill or flat panel-footer controls; defaults to raised.
microphoneMicrophone—Shared microphone controller. Defaults to a component-owned microphone.
onMessage((message: VoiceAgentMessage) => void)—Receives each message produced by the voice session; no handler by default.
onError((error: VoiceError) => void)—Receives a reported capture, playback or provider error; no handler by default.
onEnd(() => void)—Runs when the voice session ends; no handler by default.
classNamestring—Classes on the documented visual root; no override by default.
styleCSSProperties—Inline styles on the documented visual root; no inline overrides by default.
refRef<HTMLDivElement>—Receives the documented root element; no ref by default.

Built from

Used in

Dependencies

lucide-react

Import

import { ConversationBar } from "@beamline/conversation-bar";

Get it

Conversation bar is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent

More in Voice & audio

  • Recorded answer: A spoken answer against a time limit: record (the microphone asked for first, a blocked one said with what to do), the running time against the limit…
  • Orb: The agent's presence: a thin ring of light around a lens in the brand's hue that holds still at rest, sends an arc round while thinking and widens with…
  • Call grid: The people on a video call, laid out for the room they are given: tiles as large as the space allows at the camera's shape, or the person talking (or a…
  • Bar visualizer: A row of bars that says what a voice agent is doing: a sweep while connecting, the person's voice while listening, a slow breath while thinking, the…
  • Matrix: A dot-matrix display: animated frame sets (loading, pulse, wave, syncing), text and digits in a 5×7 font, or a VU meter of levels or a live source. One…
  • Transcript viewer: A recording and its words together: the spoken word lights up as it plays and the transcript follows it, any word or paragraph time plays from there…
  • Waveform: The shape of a recording: one bar per slice of loudness, fitted to any width, with the played part in the accent, unmeasured slices hatched and a loading…
  • Live waveform: Loudness drawn as it happens: a scrolling history of the microphone (or any live source) or its spectrum, a calm processing state while words are…
  • Audio player: One audio element and its controls: play with a loading state, a scrub bar with time, skip, speed and a playlist whose rows play into the same player…
  • Voice button: The control that starts and stops talking: click to toggle or hold to talk (pointer, Space, Enter or a global shortcut), with a live level while…
  • Scrub bar: A seekable timeline for audio or video: elapsed and total time, what has loaded, chapter marks, a time preview under the pointer, and the full keyboard…
  • Speech input: A text field you can speak into: the mic dictates through any speech-to-text provider, the phrase being heard shows apart from the finished words, and…
  • Voice picker: Choose a text-to-speech voice from a searchable list (name, accent, tone, use) and hear it first: each voice has its own orb, previews play one at a time…
  • Microphone selector: Choose the microphone, test it with a live level and mute it, with every permission and device state spelled out: not yet allowed, blocked (and how to…

Read next: Connect a voice-provider adapter

Guides: Build a voice agent UI in React

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.