Componentticket-stub0.82 KB gzipZero dependencies
CassetteTape
Cassette with two spinning reels, shifting tape amounts and a handwritten-style label with play toggle.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add cassette-tapeOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { CassetteTape } from "@/components/ui/cassette-tape"; <CassetteTape title="RETRO VIBES" playing={playing} onToggle={() => setPlaying(p => !p)} />Source code
cassette-tape.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxcassette-tape.tsx74 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface CassetteTapeProps extends Omit<React.HTMLAttributes<HTMLElement>, "title" | "onToggle"> { title: string; playing?: boolean; onToggle?: () => void;} export function CassetteTape({ title, playing = false, onToggle, ...props }: CassetteTapeProps) { return ( <div className="w-64 max-w-full" {...props}> <div className={cn( "relative rounded-md border border-border bg-card p-4 motion-reduce:transition-none" )}Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { CassetteTape } from "@/components/ui/cassette-tape"; <CassetteTape />| Prop | Type | Description |
|---|---|---|
| title | string | Primary heading or title text. |
| playing | boolean | Toggles playing. (Default: false) |
| onToggle | () => void | Callback invoked on toggle. |