
Microphone recorder with elapsed time, pause/resume controls, and completion callbacks.
npx shadcn@latest add https://ui.edbn.me/r/audio-recorder.jsononRecordingComplete(blob: Blob, url: string) => void—onStateChange(state: RecorderState) => void—onError(error: string) => void—maxDurationnumber300showTimerbooleantrueshowLevelbooleantruesize"sm" | "md" | "lg""md"| Prop | Type | Default | Description |
|---|---|---|---|
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. |
maxDuration | number | 300 | Max recording duration in seconds. |
showTimer | boolean | true | Show elapsed time. |
showLevel | boolean | true | Show audio level meter. |
size | "sm" | "md" | "lg" | "md" | Size variant. |
RecorderState: idle | recording | paused | stopped.