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-meet

v0.1.3

Published

A modern React webcam library with beautiful UI components and enhanced user experience

Readme

react-meet

A modern, customizable React webcam library with beautiful UI components and enhanced user experience. Built with TypeScript, Tailwind CSS, and accessibility in mind.

✨ Features

  • 🚀 Easy to use - Simple API with sensible defaults
  • 🎨 Beautiful UI - Pre-styled components with Tailwind CSS
  • 🔧 Highly customizable - Override styles and behavior easily
  • 📱 Responsive - Works on desktop and mobile devices
  • Accessible - ARIA labels and keyboard navigation
  • 🎥 Advanced features - Device switching, photo capture, mirroring
  • 🛡️ TypeScript - Full type definitions included
  • 🪝 React hooks - Use our hooks in your own components

📦 Installation

npm install react-meet
# or
yarn add react-meet
# or
pnpm add react-meet

🚀 Quick Start

import { Webcam } from "react-meet";
import "react-meet/styles";

function App() {
  return (
    <div className="w-96 h-72">
      <Webcam />
    </div>
  );
}

That's it! You now have a fully functional webcam with controls.

📖 Examples

Basic Usage

import { Webcam } from "react-meet";

function BasicWebcam() {
  return (
    <Webcam
      className="rounded-lg shadow-lg"
      constraints={{
        width: 1280,
        height: 720,
        facingMode: "user",
      }}
    />
  );
}

Custom Controls

import { Webcam, WebcamControls, useWebcam } from "react-meet";

function CustomWebcam() {
  const webcam = useWebcam();

  const handleCapture = () => {
    const photo = webcam.capturePhoto();
    if (photo) {
      console.log("Photo captured:", photo);
    }
  };

  return (
    <div className="relative">
      <Webcam
        ref={webcam.videoRef}
        showControls={false}
        onUserMedia={(stream) => console.log("Stream started:", stream)}
      />

      <WebcamControls
        onCapture={handleCapture}
        onStartStop={() =>
          webcam.isStreaming ? webcam.stopWebcam() : webcam.startWebcam()
        }
        isStreaming={webcam.isStreaming}
        devices={webcam.devices}
      />
    </div>
  );
}

Using Hooks Only

import { useWebcam } from "react-meet";

function HookExample() {
  const {
    videoRef,
    startWebcam,
    stopWebcam,
    capturePhoto,
    isStreaming,
    devices,
  } = useWebcam();

  return (
    <div>
      <video
        ref={videoRef}
        className="w-full h-auto rounded-lg"
        autoPlay
        muted
      />

      <div className="mt-4 space-x-2">
        <button
          onClick={() => (isStreaming ? stopWebcam() : startWebcam())}
          className="px-4 py-2 bg-blue-500 text-white rounded"
        >
          {isStreaming ? "Stop" : "Start"}
        </button>

        <button
          onClick={capturePhoto}
          disabled={!isStreaming}
          className="px-4 py-2 bg-green-500 text-white rounded disabled:opacity-50"
        >
          Capture
        </button>
      </div>
    </div>
  );
}

🎛️ API Reference

<Webcam> Component

| Prop | Type | Default | Description | | ------------------ | ------------------------------- | ------- | ----------------------------- | | className | string | '' | Additional CSS classes | | constraints | WebcamConstraints | {} | MediaStream constraints | | onUserMedia | (stream: MediaStream) => void | - | Callback when stream starts | | onUserMediaError | (error: Error) => void | - | Callback when stream fails | | autoPlay | boolean | true | Auto-start the webcam | | muted | boolean | true | Mute the video element | | mirrored | boolean | true | Mirror the video horizontally | | showControls | boolean | true | Show built-in controls | | showOverlay | boolean | false | Show custom overlay |

useWebcam Hook

const {
  // State
  isStreaming,
  isLoading,
  error,
  devices,
  currentDevice,
  isMirrored,

  // Methods
  startWebcam,
  stopWebcam,
  capturePhoto,
  toggleMirror,
  switchDevice,

  // Refs
  videoRef,
} = useWebcam(constraints);

🎨 Styling

react-meet uses Tailwind CSS internally but provides CSS custom properties for easy theming:

:root {
  --react-meet-primary: #3b82f6;
  --react-meet-secondary: #64748b;
  --react-meet-success: #22c55e;
  --react-meet-error: #ef4444;
}

You can also override the default classes:

.react-meet-container {
  /* Your custom styles */
}

.react-meet-controls {
  /* Your custom control styles */
}

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

📄 License

MIT © Divyanshu

🚀 Roadmap

  • [ ] Video recording functionality
  • [ ] Face detection integration
  • [ ] Virtual backgrounds
  • [ ] Screen sharing support
  • [ ] Audio controls
  • [ ] WebRTC integration

💖 Support

If you found this library helpful, please consider:

  • ⭐ Starring the repository
  • 🐛 Reporting bugs
  • 💡 Suggesting new features
  • 🤝 Contributing code

Made with ❤️ for the React community