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
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add audio-waveformOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { AudioWaveform } from "@/components/ui/audio-waveform"; <AudioWaveform title="LIVE CONCERT" artist="ORCHESTRA" duration={240} />Source code
audio-waveform.tsx + 1 helperZero 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 />| Prop | Type | Description |
|---|---|---|
| title | string | Concert / track title |
| artist | string | Performing artist or orchestra |
| venue | string | Venue and seating information |
| serial | string | Ticket serial number |
| seatInfo | string | Seat location info |
| date | string | Recording date |
| duration | number | Audio track duration in seconds (default: 228 = 03:48) |
| initialTime | number | Initial playback position in seconds (default: 34) |
| barCount | number | Number of waveform frequency bars (default: 36) |
| waveformData | number[] | Custom base waveform bar heights (array of percentages 15-100) |
| autoPlay | boolean | Whether playback starts automatically |
| onPlayPause | (isPlaying: boolean) => void | Callback fired when play/pause state changes |
| onTimeUpdate | (currentTime: number) => void | Callback fired when timestamp advances |
| onSeek | (time: number) => void | Callback fired when seeking to a new time |
| audioSrc | string | Optional audio src if binding to HTML5 audio |
| className | string | Additional container classes |