Skip to content
VenusUI
Get started

Vinyl Player

A turntable whose tonearm swings onto the record and spins it, with the album cover as the label.

Preview

Installation

npx shadcn@latest add @venusui/vinyl-player

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/vinyl-player.tsx

Usage

The code behind the preview above.

vinyl-player-demo.tsx

import { VinylPlayer } from "@/components/ui/vinyl-player"

// Cover: Unsplash (free under the Unsplash License). Artist and track are made up.
export default function VinylPlayerDemo() {
  return (
    <VinylPlayer
      className="w-[min(26rem,calc(100vw-3rem))]"
      title="Tidal Bloom"
      artist="Mara Lune"
      cover={{
        src: "https://images.unsplash.com/photo-1557672172-298e090bd0f1?w=400&h=400&fit=crop&auto=format&q=80",
        alt: "Album cover: swirls of pink and teal paint",
      }}
    />
  )
}

API reference

PropTypeDefaultDescription
cover{ src: string; alt: string }—Album cover, shown as the record's label.
title, artiststring—Shown under the player and in the play button's label.
playingboolean—Controlled playing state.
defaultPlayingbooleanfalseStart playing.
onPlayingChange(playing: boolean) => void—Called when the play button or the record is pressed.
speednumber1.8Seconds per turn. 1.8 is a real 33⅓ rpm record.

All <div> props.

Requirements

  • lucide-react for the play and pause icons. React 19 and Tailwind CSS v4.

Customization

  • It plays no audio: connect onPlayingChange to your own <audio> element to play the track.
  • Size it with a width class; the turntable keeps a 5:4 shape.

Accessibility

  • The record and the round button are both real buttons with clear labels (“Play Tidal Bloom by Mara Lune”, “Pause”).
  • “Now playing” and “Paused” are announced politely; the cover’s description is kept for screen readers.
  • With reduced motion the record doesn’t spin and the tonearm moves without animation.

Troubleshooting

The record doesn't spin.
Check that reduced motion is off in your system settings; it's deliberately still when it's on.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.
No components.json found
Run npx shadcn@latest init in your project first.
Loading preview

A card that tilts in 3D toward the pointer with spring physics.

Loading preview

Camera Shutter

Interactive

A lens with a working iris: blades close to the chosen aperture and snap shut when you release the shutter.

Loading preview

Stacked cards with the next ones peeking out; Next sends the top card to the back.