Bot Volume Slider
Inline slider for controlling the bot's audio output volume
The BotVolumeSlider component is an inline volume slider for the bot's audio output. It is the same slider that lives inside BotAudioControl's popover, extracted so you can embed it standalone — for example in a settings panel, a sidebar, or a custom toolbar.
import { BotVolumeSlider } from "@pipecat-ai/voice-ui-kit";
<div style={{ width: 280 }}>
<BotVolumeSlider />
</div>| Prop | Type | Default |
|---|---|---|
noLabel? | boolean | false |
noPercent? | boolean | false |
label? | string | "Bot volume" |
orientation? | "horizontal" | "vertical" | "horizontal" |
className? | string | undefined |
classNames? | { labelRow?: string; label?: string; percent?: string; slider?: string; } | undefined |
sliderProps? | Partial<React.ComponentProps<typeof Slider>> | undefined |
BotVolumeSliderComponent
The BotVolumeSliderComponent is the headless variant. It accepts volume and onVolumeChange directly, so you can drive it from any state source.
import { BotVolumeSliderComponent } from "@pipecat-ai/voice-ui-kit";
function Demo() {
const [volume, setVolume] = React.useState(0.8);
return (
<div style={{ width: 280 }}>
<BotVolumeSliderComponent
volume={volume}
onVolumeChange={setVolume}
/>
</div>
);
}
render(<Demo />);| Prop | Type | Default |
|---|---|---|
volume? | number | 1 |
onVolumeChange? | (volume: number) => void | undefined |
noLabel? | boolean | false |
noPercent? | boolean | false |
label? | string | "Bot volume" |
orientation? | "horizontal" | "vertical" | "horizontal" |
className? | string | undefined |
classNames? | { labelRow?: string; label?: string; percent?: string; slider?: string; } | undefined |
sliderProps? | Partial<React.ComponentProps<typeof Slider>> | undefined |
Integration
The connected BotVolumeSlider reads and writes volume through the useBotAudioOutput hook. It does not require PipecatClientProvider to render, but needs BotAudioOutput to be mounted somewhere in the tree for the volume to have any audible effect — handled by PipecatAppBase unless you pass noAudioOutput.
See Also
BotAudioControl— a button + popover that wraps this slider.useBotAudioOutput— the underlying hook.