Componentticket-stub
VinylRecord
Spinning vinyl with radial grooves, center label, a tonearm that slides in and a wobble on drop.
Preview
Live Preview
Side A
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add vinyl-recordOr install the full npm package:
npm install bigbulluiUsage
import { VinylRecord } from "@/components/ui/vinyl-record";
<VinylRecord label="SIDE A" playing={playing} onToggle={() => setPlaying(p => !p)} />Source code
vinyl-record.tsxZero dependencies (only React + utils). Copy and paste directly into your project:
"use client";
import * as React from "react";
import { cn } from "./lib/utils";
export interface VinylRecordProps {
label?: React.ReactNode;
playing?: boolean;
onToggle?: () => void;
}
export function VinylRecord({ label, playing = false, onToggle }: VinylRecordProps) {
return (
<div
className={cn(
"relative size-32 rounded-full border border-border bg-card p-4 motion-reduce:transition-none",
"group"
)}
>
<div className="absolute inset-0 rounded-full bg-gradient-to-b from-border/20 via-border/30 to-border/20" />
<div className="absolute inset-0 flex items-center justify-center">
{label || <div className="size-8 rounded-md border border-border/50 bg-border/50" />}
</div>
<div className="absolute -right-2 top-1/2 -translate-y-1/2 size-6 border-2 border-border/50" />
</div>
);
}Props
| Prop | Type | Description |
|---|---|---|
| label | React.ReactNode | Center label content. |
| playing | boolean | Rotates the disc and slides the tonearm. |
| onToggle | () => void | Play/pause toggle callback. |
| className | string | Additional classes. |