
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
simplevoicerecorderreact
Advanced tools
A modern, feature-rich React voice recorder component with TypeScript support, pause/resume, download, and more
A modern, feature-rich React voice recorder component with TypeScript support, pause/resume functionality, download capability, and comprehensive accessibility features.
npm install simplevoicerecorderreact
or
yarn add simplevoicerecorderreact
import React from 'react';
import { Recorder } from 'simplevoicerecorderreact';
import 'simplevoicerecorderreact/dist/index.css';
const App = () => {
const handleAudioUrl = (url: string | null) => {
console.log('Audio URL:', url);
};
const handleStatus = (status: 'idle' | 'recording' | 'paused' | 'completed' | 'error') => {
console.log('Recording status:', status);
};
return (
<Recorder
blobUrl={handleAudioUrl}
status={handleStatus}
title="My Voice Recorder"
/>
);
};
export default App;
| Prop | Type | Default | Description |
|---|---|---|---|
blobUrl | (url: string | null) => void | undefined | Callback function that receives the audio URL when recording is completed |
showAudioPlayUI | boolean | true | Show/hide the audio player after recording |
title | string | '' | Title displayed above the recorder |
className | string | '' | Additional CSS class names |
hideAudioTitle | boolean | false | Hide the title header |
status | (status: 'idle' | 'recording' | 'paused' | 'completed' | 'error') => void | undefined | Callback function for recording status changes |
onRecordingStart | () => void | undefined | Callback fired when recording starts |
onRecordingStop | () => void | undefined | Callback fired when recording stops |
onRecordingPause | () => void | undefined | Callback fired when recording is paused |
onRecordingResume | () => void | undefined | Callback fired when recording resumes |
maxDuration | number | 0 | Maximum recording duration in seconds (0 = unlimited) |
showDownloadButton | boolean | true | Show/hide the download button |
showPauseButton | boolean | true | Show/hide the pause/resume button |
showClearButton | boolean | true | Show/hide the clear button |
downloadFileName | string | 'recording' | Default filename for downloaded audio |
disabled | boolean | false | Disable all recorder controls |
import { Recorder } from 'simplevoicerecorderreact';
import 'simplevoicerecorderreact/dist/index.css';
function App() {
return <Recorder />;
}
import { Recorder } from 'simplevoicerecorderreact';
import 'simplevoicerecorderreact/dist/index.css';
function App() {
const handleAudioUrl = (url: string | null) => {
if (url) {
console.log('Recording completed:', url);
// Do something with the audio URL
}
};
const handleStatus = (status: string) => {
console.log('Status:', status);
};
return (
<Recorder
blobUrl={handleAudioUrl}
status={handleStatus}
title="Voice Recorder"
/>
);
}
import { Recorder } from 'simplevoicerecorderreact';
import 'simplevoicerecorderreact/dist/index.css';
import './CustomStyles.scss';
function App() {
return (
<Recorder
className="my-custom-recorder"
title="Custom Styled Recorder"
/>
);
}
import { Recorder } from 'simplevoicerecorderreact';
import 'simplevoicerecorderreact/dist/index.css';
function App() {
return (
<Recorder
maxDuration={60} // 60 seconds maximum
title="60 Second Recorder"
/>
);
}
import { Recorder } from 'simplevoicerecorderreact';
import 'simplevoicerecorderreact/dist/index.css';
function App() {
const handleAudioUrl = (url: string | null) => {
// Handle audio URL programmatically
if (url) {
// Upload to server, etc.
}
};
return (
<Recorder
showAudioPlayUI={false}
blobUrl={handleAudioUrl}
title="Minimal Recorder"
/>
);
}
For more control, you can use the useRecorder hook directly:
import { useRecorder } from 'simplevoicerecorderreact';
import 'simplevoicerecorderreact/dist/index.css';
function CustomRecorder() {
const {
audioURL,
isRecording,
isPaused,
startRecording,
stopRecording,
pauseRecording,
resumeRecording,
clearRecording,
error,
audioBlob,
} = useRecorder();
return (
<div>
{error && <div>Error: {error}</div>}
<button onClick={startRecording} disabled={isRecording}>
Start
</button>
<button onClick={stopRecording} disabled={!isRecording}>
Stop
</button>
{isRecording && (
<button onClick={isPaused ? resumeRecording : pauseRecording}>
{isPaused ? 'Resume' : 'Pause'}
</button>
)}
{audioURL && <audio controls src={audioURL} />}
</div>
);
}
// pages/index.tsx or app/page.tsx
import { Recorder } from 'simplevoicerecorderreact';
import 'simplevoicerecorderreact/dist/index.css';
export default function Home() {
return (
<div>
<h1>Voice Recorder</h1>
<Recorder />
</div>
);
}
This component uses the MediaRecorder API, which is supported in:
For older browsers, you may need polyfills.
Full TypeScript support is included. Import types as needed:
import { Recorder, RecorderProps, UseRecorderReturn } from 'simplevoicerecorderreact';
Important: You must import the CSS file for the component to display correctly:
import 'simplevoicerecorderreact/dist/index.css';
The component uses SCSS modules. You can override styles by:
className propThe component includes:
The component handles various error scenarios:
Errors are displayed to the user and can be accessed via the error property when using the hook directly.
Contributions are welcome! Please feel free to submit a Pull Request.
ISC
Ahmad Faraz
FAQs
A modern, feature-rich React voice recorder component with TypeScript support, pause/resume, download, and more
We found that simplevoicerecorderreact demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.