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
  • 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
  • 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

Bars move only while connected and on screen; the timer ticks once a second only during a call.

Props

PropTypeDefaultDescription
sessionVoiceAgentSession—Share one from useVoiceAgent() with the rest of the screen (a transcript, an orb).
adapterVoiceAgent—Or let the bar hold its own session. A VoiceAgent adapter's connect({ stream, mode, signal }, on) opens the provider's session and maps its events: agent speaking → on.status('talking'), user speech detected → on.status('listening'), response pending → on.status('thinking'); transcripts → on.transcript({ id, role, text, final }) (re-send the same id while a line grows); socket closed unexpectedly → on.connection('reconnecting') then 'connected', or on.error({ kind: 'network' }). Return { sendText, setMuted, outputLevel, disconnect }; outputLevel can read an AnalyserNode on the agent's audio. ElevenLabs agents: start their conversation session with your agent id (signed URL from your server) and forward its mode-change, message and disconnect callbacks. OpenAI Realtime: add the microphone track to an RTCPeerConnection, play the remote track, and map response.audio_transcript.delta / done and input_audio_buffer.speech_started / stopped events.
agentNamestring"the agent"Used in labels: Call Northline.
variant"raised" | "flat""raised"flat drops the pill's fill and shadow for a footer that is already a frame.
allowTextbooleantrueOffer typing during a call or instead of one.
placeholderstring"Type a message"
onMessage / onError / onEndcallbacks—With an adapter (own session).
classNamesConversationBarClassNames—
style / refCSSProperties / native Ref—
fieldRefRef<HTMLInputElement>—

Built from

Dependencies

lucide-react

Import

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

Get it

Conversation bar is part of Beamline: 190 React components and screens your coding agent (Claude Code, Codex, Cursor or any MCP client) installs into your app through Beamline's MCP server, as a ready-built package or as plain React source you can change. $49 one payment (regular $200), no subscription, a year of updates, one licence for your whole team. Get Beamline · Connect your agent

More in Voice & audio

  • 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…
  • 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…
  • 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…
  • 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…
  • 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…
  • 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…
  • 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…
  • 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…
  • 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…
  • 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…
  • 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…