Wave Player
A shadcn-styled waveform wave player built on wavesurfer.js.
Demo Track
A collection of audio UI built with wavesurfer.js and shadcn/ui. Install with one command, own the code, style it with your tokens.
import WavePlayer from "@/components/waves-cn/wave-player";
export default function Page() {
return (
<WavePlayer
src="/coastline.mp3"
title="Coastline"
/>
);
}Coastline
Demo track · wave-player
0:00 / 0:00
Click or drag the waveform to seek
Built with
Why waves-cn
Components land in your repo through the shadcn CLI. No package to upgrade, no black box. Edit anything.
Wave, progress and cursor colors resolve from your CSS variables, so dark mode and brand themes work out of the box.
Regions, timeline, minimap, spectrogram, zoom, hover and envelope are pre-integrated with sensible defaults.
Every prop and event handler is fully typed against wavesurfer.js, so your editor tells you what is possible.
Components
11 components, every one live below. Play, drag, zoom, record. Then copy the one you need.
A shadcn-styled waveform wave player built on wavesurfer.js.
Demo Track
A headless-friendly wave recorder with live waveform, built on wavesurfer.js.
A shadcn-styled waveform player with draggable and resizable region markers built on wavesurfer.js RegionsPlugin.
Demo Track
A waveform player with timeline markers built on wavesurfer.js.
Demo Track
A shadcn-styled waveform player with a minimap overview built on wavesurfer.js MinimapPlugin.
Demo Track
A shadcn-styled waveform player with frequency heatmap built on wavesurfer.js SpectrogramPlugin.
Demo Track
A wave player with variable playback speed control, built on wavesurfer.js.
A wave player with mouse-wheel zoom, built on wavesurfer.js ZoomPlugin.
Zoom: 100 px/s— scroll to zoom
A shadcn-styled waveform player with a hover cursor and time tooltip built on wavesurfer.js HoverPlugin.
Demo Track
A shadcn-styled waveform player with volume automation editing built on wavesurfer.js EnvelopePlugin.
Demo Track
Envelope volume: 80%— drag points to adjust
A waveform player synced to a video element, built on wavesurfer.js.
Get started
Works with any existing shadcn/ui project. No extra provider, no global CSS to import.
Point the shadcn CLI at waves-cn once in your components.json.
"registries": {
"@waves-cn": "https://waves-cn.vercel.app/r/{name}.json"
}The CLI copies the component and the shared wave-cn core into your project.
npx shadcn@latest add @waves-cn/wave-playerImport from your own components folder and pass an audio source.
import WavePlayer from "@/components/waves-cn/wave-player";
<WavePlayer src="/track.mp3" title="My track" />Open source
waves-cn is MIT licensed and maintained on GitHub. Fix a bug, add a plugin wrapper, improve a doc page. Every pull request is welcome.