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-media-kit

v0.4.0

Published

Headless, unstyled React video player primitives

Downloads

697

Readme

react-media-kit

Headless, unstyled video and audio player primitives for React.

react-media-kit gives you the behavior of a media player as a set of composable components. It renders no CSS and imposes no visual design, so your player looks exactly however you want!

Features

  • 🧱 Compound components - Player, Video, Audio, Controls, Seekbar, Volume, TimeDisplay, PlayButton, SkipButton, FullscreenButton, PipButton, PlaybackRateButton. Use only the parts you need.
  • 🎨 Unstyled by default - no shipped CSS, no default theme. Style everything yourself with plain class names.
  • 🏷️ Data-attribute state hooks - playing, fullscreen, picture-in-picture, and other states are exposed as data-* attributes, so state-driven styling stays in CSS instead of JS.
  • ⌨️ Keyboard shortcuts built in (play/pause, mute, fullscreen, seeking).
  • 📦 Small footprint - Tree-shakeable, with no runtime dependencies beyond React.
  • Optimized for performance - player state lives outside React in an external store; components subscribe to only the slice of state they need.
  • 🔒 Typed - written in TypeScript.

Installation

npm install react-media-kit
pnpm add react-media-kit
yarn add react-media-kit

Requires React and React DOM >=19.

Usage

import { Player, Video, Controls, Seekbar, PlayButton, TimeDisplay } from "react-media-kit";

function App() {
  return (
    <Player.Root>
      <Player.Container>
        <Video.Root>
          <Video.Player src="/my-video.mp4" />
        </Video.Root>

        <Controls.Root>
          <Seekbar.Root>
            <Seekbar.Track>
              <Seekbar.Progress />
              <Seekbar.Buffer />
              <Seekbar.Thumb />
            </Seekbar.Track>
          </Seekbar.Root>

          <PlayButton.Root>Play</PlayButton.Root>

          <TimeDisplay.Root>
            <TimeDisplay.Toggle>
              <TimeDisplay.Timer />
              <span>/</span>
              <TimeDisplay.Duration />
            </TimeDisplay.Toggle>
          </TimeDisplay.Root>
        </Controls.Root>
      </Player.Container>
    </Player.Root>
  );
}

All styling is up to you — target elements by class name or by the data-* state attributes they expose.

Adaptive streaming

react-media-kit ships no streaming engine (HLS, DASH, ...) — it stays dependency-free. Video.Player and Audio.Player both accept a plain ref, which easily lets you hook in hls.js, dash.js, shaka-player, or whichever engine you need.

Core Concepts

Each control is a root + sub-parts, in the spirit of BaseUI-style primitives:

| Component | Purpose | | -------------------- | ------------------------------------------- | | Player | Top-level provider; owns player state | | Video | The <video> element and its overlay | | Audio | The <audio> element | | Controls | Wrapper for the control bar | | Seekbar | Scrub/seek, with progress and buffer ranges | | Volume | Mute toggle and volume slider | | TimeDisplay | Current time / duration | | PlayButton | Play/pause toggle | | SkipButton | Skip forward/back by an interval | | FullscreenButton | Toggle fullscreen | | PipButton | Toggle picture-in-picture | | PlaybackRateButton | Set a specific playback rate |

License

MIT