Skip to content
Sign upGet access
MicrointeractionsWave volumeMenu

Wave volume (Pro)

ProIncluded in $99

A volume slider whose track is the sound.

ProDrag down and the speaker loses its waves; fling to the top and the thumb squashes while the peaks hit the ceiling and flash.

Left of the thumb the bars dance to what is playing; right of it they rest at their shape. The thumb squashes and stretches with how fast you drag it, the speaker loses its waves as you go quiet, and the number rolls. Fling it to the top and the peaks that hit the ceiling flash hot under a clip line, then calm down. Give it an analyser and the bars follow the real audio, like the voice an agent is speaking.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/wave-volume

Needs chatcn Pro

This command works with a Pro license, along with every Pro component.

Or start free: sign up and get three Pro components on us, with a new one every month.

Usage

tsx
import { WaveVolume } from "@/components/ui/chatcn/pro/wave-volume"

<WaveVolume value={volume} onValueChange={setVolume} analyser={voiceAnalyser} />

Props

PropTypeNotes
value / defaultValue / onValueChangenumber0 to 1
playingbooleanDefault true
analyserAnalyserNodeReal audio for the bars
labelReactNodeDefault Volume

Keyboard

KeyAction
Arrow keys2 percent, 10 with Shift
Home / EndSilent or full

Accessibility

  • A slider with its value as a percentage.

Motion

  • The thumb squash rides a spring from drag speed; the clip flash decays over about a second. Reduced motion: the thumb jumps and the bars hold still.