Pipecat UI
Components

Device Select

Media device picker for microphones, speakers, or cameras.

Open in Storybook

Installation

pnpm dlx shadcn@latest add @pipecat/device-select

Usage

One item, two UIs, three device kinds:

import {
  DeviceDropdown,
  DeviceDropdownContent,
  DeviceDropdownTrigger,
  DeviceSelect,
} from "@/components/pipecat/device-select";
import { Button } from "@/components/ui/button";

// Select-based pickers
<DeviceSelect kind="audioinput" />
<DeviceSelect kind="audiooutput" />

// Dropdown menu composed shadcn-style around any trigger
<DeviceDropdown kind="videoinput">
  <DeviceDropdownTrigger render={<Button variant="outline">Camera</Button>} />
  <DeviceDropdownContent />
</DeviceDropdown>

Key props

PropTypeDescription
kind"audioinput" | "audiooutput" | "videoinput"Which device list to control
placeholderstringSelect placeholder (kind-aware default)
guideReactNodeLeading icon/label inside the select trigger
isLoading / loadingTextboolean / ReactNodeLoading state; derived from the client in connected mode
unavailableTextReactNodeBlocked/error message; derived in connected mode, overridable
menuLabelReactNode | nullDropdown heading (on DeviceDropdownContent); null hides it

States follow the kit convention: isLoadingunavailableText → interactive. The file also exports usePipecatDevices(kind) and usePipecatDeviceState(kind) — device lists and loading/error state for one kind — plus formatDeviceLabel, all reused by the media controls.

On this page