edbnedbn/ui
ComponentsMapsAudioPDF
GitHub stars
Explorer
Audio
Chat
Audio
Display

Audio Recorder

Microphone recorder with elapsed time, pause/resume controls, and completion callbacks.

Audio

Installation

npx shadcn@latest add https://ui.edbn.me/r/audio-recorder.json

Manual

API Reference

ProponRecordingComplete
Type(blob: Blob, url: string) => void
Default—
DescriptionCalled when recording finishes.
ProponStateChange
Type(state: RecorderState) => void
Default—
DescriptionCalled when recorder state changes.
ProponError
Type(error: string) => void
Default—
DescriptionCalled on recording errors.
PropmaxDuration
Typenumber
Default300
DescriptionMax recording duration in seconds.
PropshowTimer
Typeboolean
Defaulttrue
DescriptionShow elapsed time.
PropshowLevel
Typeboolean
Defaulttrue
DescriptionShow audio level meter.
Propsize
Type"sm" | "md" | "lg"
Default"md"
DescriptionSize variant.
Props for the audio-recorder component.
PropTypeDefaultDescription
onRecordingComplete(blob: Blob, url: string) => void—Called when recording finishes.
onStateChange(state: RecorderState) => void—Called when recorder state changes.
onError(error: string) => void—Called on recording errors.
maxDurationnumber300Max recording duration in seconds.
showTimerbooleantrueShow elapsed time.
showLevelbooleantrueShow audio level meter.
size"sm" | "md" | "lg""md"Size variant.

RecorderState: idle | recording | paused | stopped.