Componentmedia0.87 KB gzipZero dependencies

Voice Note List

Voice note list: play buttons, waveforms, durations.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add voice-note-list

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { VoiceNoteList } from "@/components/ui/voice-note-list"; <VoiceNoteList />

Source code

voice-note-list.tsx + 1 helper

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

tsxvoice-note-list.tsx67 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface VoiceNote {  id: string;  sender: string;  duration: string;  bars: number[];} export interface VoiceNoteListProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onPlay"> {  notes: VoiceNote[];  onPlay?: (id: string) => void;} /** Voice note playlist: audio playback + waveform + duration. */

Props

PropTypeDescription
notesVoiceNote[]Configures notes. (Default: [])
onPlay(id: string) => voidCallback invoked on play.