Audio Recorder

A React microphone recorder built on MediaRecorder with start, pause and stop, an elapsed timer, live waveform bars, playback with a scrubber, download and a max duration.

src/registry/ui/audio-recorder.tsx/r/audio-recorder.json

Installation#

bash
npx shadcn@latest add @minidev/audio-recorder

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/audio-recorder.json

Usage#

tsx
import { AudioRecorder } from "@/components/ui/audio-recorder"

export function Example() {
  return <AudioRecorder />
}

API reference#

AudioRecorder props
PropTypeDefault
maxDurationnumber120
onRecorded(blob: Blob, meta: { duration: number; url: string; mimeType: string }) => void-
titlestring"Voice note"
descriptionstring"Attach to invoice INV-2041 for North...
fileNamestring"voice-note"
barsnumber48
classNamestring-

Dependencies#

npm

lucide-reactmotion

Built from

No other MiniDev files
All media and upload components