Componentticket-stub0.56 KB gzipZero dependencies

VinylRecord

Spinning vinyl with radial grooves, center label, a tonearm that slides in and a wobble on drop.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add vinyl-record

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { VinylRecord } from "@/components/ui/vinyl-record"; <VinylRecord label="SIDE A" playing={playing} onToggle={() => setPlaying(p => !p)} />

Source code

vinyl-record.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxvinyl-record.tsx42 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface VinylRecordProps extends Omit<React.HTMLAttributes<HTMLElement>, "onToggle"> {  label?: React.ReactNode;  playing?: boolean;  onToggle?: () => void;} export function VinylRecord({ label, playing = false, onToggle, ...props }: VinylRecordProps) {  return (    <div      role={onToggle ? "button" : undefined}      tabIndex={onToggle ? 0 : undefined}      aria-pressed={onToggle ? playing : undefined}      aria-label={onToggle ? (playing ? "Pause vinyl record" : "Play vinyl record") : undefined}

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { VinylRecord } from "@/components/ui/vinyl-record"; <VinylRecord />
PropTypeDescription
labelReact.ReactNodeAccessible label text rendered or attached to the control.
playingbooleanToggles playing. (Default: false)
onToggle() => voidCallback invoked on toggle.