The Record component provides an audio recording interface with real-time waveform visualization, allowing users to record, pause, resume, and save audio clips.
Click the record button to start recording. Use pause/resume controls while recording, and stop to save the audio.
The Record component accepts the following props:
name - Input name attribute for the audio file (required)variant - Visual style: solid or soft (default: solid)color - Color theme: default, surface, primary, secondary, error, or muted (default:
error)url - Optional upload URL. If provided, the audio will be uploaded via POST requestheaders - Optional headers to include in the upload request (e.g., authentication)onRecordingComplete - Callback function called when recording is complete. Receives
the audio Blob and object URLclass - Additional CSS classes to applyBasic usage with local file input:
With upload to server:
This component requires microphone access. The browser will prompt the user for permission on first use. Make sure your site is served over HTTPS for microphone access to work.