195 Pro components and page blocks

Get Pro

Updated

Mute Toggle

New

Preview

Customize

Icon only
Soft
Medium
Muted colour

Installation

npx shadcn@latest add https://uibrik.com/r/mute-toggle.json
Adds the files to components/uibrik/mute-toggle and installs motion and react-use-measure. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/mute-toggle.

Usage

import { MuteToggle } from "@/components/uibrik/mute-toggle/mute-toggle";​<MuteToggle  display="icon"  variant="soft"  size="md"  mutedColor="#dc2626"  defaultMuted={false}  // muted={false}  // onMutedChange={(muted) => {}}/>

Where to use Mute Toggle

  • Video and audio players

    The waves folding away show the sound going off, not just an icon swap.

    Pairs with Music Player and Voice Note

  • Calls and meetings

    A clear muted state with an optional tint keeps people from talking into a muted mic.

    Pairs with Meeting Planner

  • Autoplaying hero videos

    A quiet icon-only button sits in a video corner and still reads instantly.

Props

MuteToggle
display
Type "icon" | "label"
"icon"
Icon alone, or with a label that rolls between states.
label
Type string
"Sound on"
Label while sound is on.
mutedLabel
Type string
"Muted"
Label while muted.
variant
Type "soft" | "ghost"
"soft"
Filled, or transparent until hovered.
size
Type "sm" | "md" | "lg"
"md"
Height and icon size.
mutedColor
Type string
"#dc2626"
Tint of the icon while muted.
defaultMuted
Type boolean
false
State on mount when uncontrolled.
muted / onMutedChange
Type boolean / (muted) => void
–
Controlled state.
className
Type string
–
Classes for the button.