Channel Toggle
Mute, solo and monitor toggle buttons with their own pressed colours.
Installation
$ pnpm dlx shadcn@latest add @audiocn/channel-toggleUsage
import {
MonitorToggle,
MuteToggle,
SoloToggle,
} from "@/components/ui/channel-toggle";<MuteToggle pressed={muted} onPressedChange={setMuted}>M</MuteToggle>
<SoloToggle pressed={solo} onPressedChange={setSolo}>S</SoloToggle>The presets set the tone and a default aria-label. Children are a letter, a word or an icon; nothing is rendered by default. Use ChannelToggle with a tone for anything else.
Examples
Variants
default
outline
ghost
Theming
| Token or attribute | Meaning |
|---|---|
--channel-mute, --channel-solo, --channel-monitor | Pressed colours |
data-pressed | Pressed |
data-tone | mute, solo, monitor or neutral |
Accessibility
Toggles are buttons with aria-pressed. The presets are labelled "Mute", "Solo" and "Monitor"; override aria-label to name the channel, such as "Mute microphone".
API reference
Prop
Type