02 · press · players
Vinyl player Pro
Press play and the record spins up in its well; grab it to scrub, and next turns the cover in its bezel like a dial. Its groove light is fixed to the room, so the highlights stay put while the record turns under them, with a lit rim, a steel spindle and paper grain on the label.
Install
npx shadcn@latest add @mu-pro/vinyl-playerPro. Installs with a licence key through the @mu-pro registry. Checkout opens soon: until then Pro installs are closed, and nothing can be bought on this site.
Usage
import { VinylPlayer } from "@/components/mu/vinyl-player/VinylPlayer";
<VinylPlayer
tracks={[
{ title: "Opening", artist: "Your Band", duration: 201, cover: "/covers/opening.webp", src: "/audio/opening.mp3" },
]}
/>How it works
Input and reduced motion
- Pointer / touch: play or pause, next track, mute; drag along the groove to seek (the target is 44px tall), or grab the record and turn it (one turn is 12 seconds, backwards included). Next winds the thumb and the time back to 0:00 as the cover turns.
- Keyboard: every control is a button in tab order; the progress line is a range (arrow keys seek).
- Reduced motion: the record doesn't spin, and the cover, label, title and time change at once, with no dial turn or wind.
- Off-screen: the platter and the clock pause while the player is out of view. With a
src, the audio keeps playing and the readout catches up when it returns.
Props
| Prop | Default | What it does |
|---|---|---|
tracks | three demo tracks | { title, artist, duration, cover?, src? }. Without src it keeps time silently; without cover it uses built-in artwork |
defaultPlaying | false | start playing on mount (with a src, it stays paused if the browser blocks autoplay) |
onTrackChange | — | called with the new track index |
labels | English | { play, pause, next, mute, unmute, seek } for the buttons' accessible names |
sound | off | key and motor sounds: true, or a volume 0–1 (see Sound) |
className | — | added to the root |
Sound
Off by default. With sound (or a volume, sound={0.5}) the keys are heard: play spins the motor up, pause runs it down, next ticks the bezel round, mute clicks. A track ending on its own is silent, and the motor stops if the player scrolls out of view. setMuted(true) from components/mu/sounds.ts silences every cottoncandy item at once.
Licence
Included with Pro: use it in unlimited end products for you and your clients; no reselling as a kit. See the licence.