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
Open ↗

Installation

Tokens guide →

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

npx bigbullui add cassette-tape

Or install the full npm package:

npm install bigbullui

Usage

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 helper

Zero 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 />
PropTypeDescription
titlestringPrimary heading or title text.
playingbooleanToggles playing. (Default: false)
onToggle() => voidCallback invoked on toggle.