npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-audio-recrd

v1.0.1

Published

A React component for recording audio with a friendly UI

Readme

React Student Audio Recorder

A React component for recording audio with a student-friendly UI. Features include audio compression, time limits, and a clean, intuitive interface.

Features

  • 🎙️ Simple audio recording interface
  • ⏱️ Configurable recording time limit
  • 🗜️ Audio compression (opus codec)
  • 🎯 Customizable callbacks for save/delete actions
  • 📱 Responsive design with Tailwind CSS
  • 🎨 Clean, intuitive UI with clear status indicators
  • ♿ Accessible with ARIA labels
  • 🧪 Fully tested with Jest

Installation

npm install react-audio-recrd

Usage

import { AudioRecorder } from 'react-audio-recrd';

function App() {
  const handleSave = (blob) => {
    // Handle the recorded audio blob
    console.log('Recorded audio:', blob);
    
    // Example: Upload to server
    const formData = new FormData();
    formData.append('audio', blob, 'recording.webm');
    // fetch('/api/upload', { method: 'POST', body: formData });
  };

  const handleDelete = () => {
    // Handle deletion
    console.log('Recording deleted');
  };

  return (
    <AudioRecorder
      onSave={handleSave}
      onDelete={handleDelete}
      maxDuration={300} // 5 minutes
      compressionBitsPerSecond={96000} // 96kbps
    />
  );
}

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | onSave | (blob: Blob) => void | () => {} | Callback when recording is saved | | onDelete | () => void | () => {} | Callback when recording is deleted | | maxDuration | number | 300 | Maximum recording duration in seconds | | compressionFormat | string | 'audio/webm;codecs=opus' | Audio compression format | | compressionBitsPerSecond | number | 96000 | Audio bitrate in bits per second |

Browser Support

This component uses the MediaRecorder API. Check browser compatibility for support details.

The component requires these browser features:

  • MediaRecorder API
  • getUserMedia API
  • Web Audio API

Development

# Install dependencies
npm install

# Run tests
npm test

# Build package
npm run build

# Lint code
npm run lint

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

MIT © Artur Gomes

Notes

  • The component uses Opus codec for audio compression, providing good quality at low bitrates
  • Recording automatically stops when reaching maxDuration
  • Designed with accessibility in mind, including proper ARIA labels and keyboard navigation
  • Uses Tailwind CSS for styling - make sure Tailwind is configured in your project

Support

If you find any bugs or have feature requests, please create an issue in the GitHub repository.