Skip to main content

Agent Track Control

A UI control for managing media tracks (microphone, camera, screen share).

Usage

Features

  • Toggle the capture of a client's media input (microphone, camera, screen share)
  • Select from five sizes: icon, sm, md, lg, and xl
  • Select from three styles: default, outline, and livekit
  • Renders an audio visualizer when an audio track is provided
  • Displays a select dropdown when multiple input devices are available

Installation

pnpm dlx shadcn@latest add @agents-ui/agent-track-control

Props

Prop nameTypeDefault
kind
enum
–
source
enum
–
pressed?
boolean
–
pending?
boolean
–
disabled?
boolean
–
audioTrack?
TrackReferenceOrPlaceholder
–
className?
string
–
onPressedChange?
function
–
onMediaDeviceError?
function
–
onActiveDeviceChange?
function
–