Pro
Vinyl deck
A record player. Press play and the tonearm swings out over the record while the platter spins up to 33⅓ rpm; press pause and the arm lifts while the record slows to a stop on its own weight.
pnpm dlx shadcn@latest add @caliper/vinyl-deckWhen to use
Use it for
- Music pages, album launches and listening rooms.
- A playful skin for a simple play and pause control.
Skip it when
- A full player with queue and volume; use `NowPlaying`.
- Lists of many tracks.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- Spin has weight
- The platter gains speed over about a second and loses it over about two, so a stop is as gradual as a real one.
- Progress moves the needle
- Pass
progressand the needle works inward through the grooves.
Usage
- One button
- It is a single play and pause button with the title and artist as text; the picture is decoration.
Installation
pnpm dlx shadcn@latest add @caliper/vinyl-deck
Adds its 3 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
Import it from your copy of the source. The example behind the preview comes with the source. It is built from VinylDeck and labelHue.
import { VinylDeck, labelHue } from "@/components/ui/vinyl-deck"
The worked example comes with Pro
The 30-line example behind the preview opens here, ready to copy.
- 626 Pro parts, blocks and page templates, all with source
- $149 once, with lifetime updates. No renewal
- A full refund within 14 days if it is not for you
API reference
VinylDeck
component
Also accepts the native props of its root element and a ref.
labelHue
component
No props of its own; it accepts the native props of its root element.
Accessibility
It is built on native elements and keeps aria-hidden and aria-pressed in step with state.
No custom key handling; Tab and the native activation keys do the work.
Motion
It checks prefers-reduced-motion itself and settles immediately instead of travelling. Every state is still reachable.
Related
- Now playingA compact card for the current track with controls.
- Waveform playerA recording you can see. The waveform is the seek bar, the played part fills in as it plays, and the pointer shows the time under it before you press. Speed steps through 1×, 1.5× and 2×.
- Voice orbAn animated orb that shows idle, listening, thinking and speaking states.