Componentmedia0.87 KB gzipZero dependencies
Voice Note List
Voice note list: play buttons, waveforms, durations.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add voice-note-listOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { VoiceNoteList } from "@/components/ui/voice-note-list"; <VoiceNoteList />Source code
voice-note-list.tsx + 1 helperZero 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
| Prop | Type | Description |
|---|---|---|
| notes | VoiceNote[] | Configures notes. (Default: []) |
| onPlay | (id: string) => void | Callback invoked on play. |