Skip to content
caliper ui docs

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.

Pro
pnpm dlx shadcn@latest add @caliper/vinyl-deck

Side A

Play it; the needle works inward as it goes.

Slow Harbour

The Quiet Hours

Installs components/ui/vinyl-deck.tsxDepends on @radix-ui/react-slot, lucide-reactMotion honours reduced motion

When 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 progress and 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

terminal
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.

example.tsx
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
Checking your licence…

API reference

VinylDeck

component

Also accepts the native props of its root element and a ref.

PropTypeDefaultDescription
title *string—
artist *string—
coverstring—A picture for the record's centre label. Without one the label takes a colour from the title.
playingboolean—
defaultPlayingbooleanfalse
onPlayingChange((playing: boolean) => void)—
progressnumber0How far through the side, from 0 to 1; the needle travels in as it grows.

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.

All Media examples