Componentmedia3.88 KB gzipZero dependencies

Audio Waveform

Interactive multi-bar audio wave visualizer for concert recordings with live animated frequency bars and timestamp readout.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add audio-waveform

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { AudioWaveform } from "@/components/ui/audio-waveform"; <AudioWaveform title="LIVE CONCERT" artist="ORCHESTRA" duration={240} />

Source code

audio-waveform.tsx + 1 helper

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

tsxaudio-waveform.tsx651 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface AudioWaveformProps  extends Omit<React.HTMLAttributes<HTMLDivElement>, "onTimeUpdate"> {  /** Concert / track title */  title?: string;  /** Performing artist or orchestra */  artist?: string;  /** Venue and seating information */  venue?: string;  /** Ticket serial number */  serial?: string;  /** Seat location info */  seatInfo?: string;  /** Recording date */

Props

Interactive Prop Playground

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

tsx3 lines
import { AudioWaveform } from "@/components/ui/audio-waveform"; <AudioWaveform />
PropTypeDescription
titlestringConcert / track title
artiststringPerforming artist or orchestra
venuestringVenue and seating information
serialstringTicket serial number
seatInfostringSeat location info
datestringRecording date
durationnumberAudio track duration in seconds (default: 228 = 03:48)
initialTimenumberInitial playback position in seconds (default: 34)
barCountnumberNumber of waveform frequency bars (default: 36)
waveformDatanumber[]Custom base waveform bar heights (array of percentages 15-100)
autoPlaybooleanWhether playback starts automatically
onPlayPause(isPlaying: boolean) => voidCallback fired when play/pause state changes
onTimeUpdate(currentTime: number) => voidCallback fired when timestamp advances
onSeek(time: number) => voidCallback fired when seeking to a new time
audioSrcstringOptional audio src if binding to HTML5 audio
classNamestringAdditional container classes