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

@gfazioli/mantine-audio

v1.0.2

Published

A Mantine-native audio player for React with waveform visualization and live spectrum analyzer, built on Web Audio API. Compound component API + headless useAudio hook.

Readme

Mantine Audio Component

NPM version NPM Downloads NPM Downloads NPM License


 ❤️ If this component has been useful to you or your team, please consider becoming a sponsor 

Overview

This component is built on top of the Mantine library.

The Mantine Audio component is a Mantine-native audio player for React with waveform visualisation and a live spectrum analyser, built on the Web Audio API. It ships as three layers in a single package: a polished default <Audio /> with four variants, a fully composable compound API (ten sub-components you can reorder and restyle), and a fully headless useAudio hook to build 100% custom UIs.

Features

  • 🎧 Drop-in player<Audio src="…" /> and you have a styled, accessible audio player
  • 🧩 Compound API — 10 sub-components (Audio.PlayButton, Audio.Timeline, Audio.Waveform, Audio.Spectrum, Audio.VolumeSlider, Audio.SpeedControl, …) reorderable and re-styleable
  • 🪝 Headless useAudio hook — 16 state values + 12 actions for fully custom UIs
  • 🌊 Waveform visualisation — peaks decoded via Web Audio + click/drag to seek, 60fps playhead tracking via RAF
  • 🎚️ Live spectrum analyserAnalyserNode driven, solid or gradient bars, optional mirror
  • 🔀 Multiple <source> supportsources={[…]} for codec / format / media-query fallbacks + fallbackSrc for runtime errors
  • 🎛️ 5 sizes × 4 variantsxs/sm/md/lg/xl × overlay/minimal/floating/bordered (all CSS-driven via data attributes)
  • 🌅 asBackground preset — turn the same player into a hero / section ambient track in one line
  • 🎚️ Scrub-with-sound — optional scrubSound lets the user hear snippets while dragging (Audacity / iTunes style)
  • ⌨️ Keyboard shortcuts — Space, J/K/L, ←/→, ↑/↓, M, > / <
  • 🎨 Full Styles APIclassNames, styles, vars, unstyled, theme-aware out of the box
  • 📦 TypeScript — strict types, every prop documented

[!note]

Demo and DocumentationMore Mantine Components

Installation

npm install @gfazioli/mantine-audio

or

yarn add @gfazioli/mantine-audio

After installation import package styles at the root of your application:

import '@gfazioli/mantine-audio/styles.css';

Usage

import { Audio } from '@gfazioli/mantine-audio';

function Demo() {
  return <Audio src="/track.mp3" />;
}

Compound layout with waveform on top and a custom skip button:

<Audio src="/track.mp3">
  <Audio.Waveform height={80} />
  <Audio.Controls>
    <Audio.SkipButton seconds={-15} />
    <Audio.PlayButton />
    <Audio.SkipButton seconds={15} />
    <Audio.Timeline />
    <Audio.TimeDisplay />
    <Audio.MuteButton />
    <Audio.VolumeSlider />
    <Audio.SpeedControl />
  </Audio.Controls>
</Audio>

Headless usage with the useAudio hook:

import { useAudio } from '@gfazioli/mantine-audio';

function MyPlayer() {
  const { playing, currentTime, duration, peaks, analyser, toggle, audioRef } = useAudio({
    src: '/track.mp3',
  });

  return (
    <div>
      <audio ref={audioRef} crossOrigin="anonymous" />
      <button onClick={toggle}>{playing ? 'Pause' : 'Play'}</button>
      <span>{currentTime.toFixed(1)} / {duration.toFixed(1)}</span>
    </div>
  );
}

Sponsor

 ❤️ If this component has been useful to you or your team, please consider becoming a sponsor 

Your support helps me:

  • Keep the project actively maintained with timely bug fixes and security updates
  • Add new features, improve performance, and refine the developer experience
  • Expand test coverage and documentation for smoother adoption
  • Ensure long‑term sustainability without relying on ad hoc free time
  • Prioritize community requests and roadmap items that matter most

Open source thrives when those who benefit can give back—even a small monthly contribution makes a real difference. Sponsorships help cover maintenance time, infrastructure, and the countless invisible tasks that keep a project healthy.

Your help truly matters.

💚 Become a sponsor today and help me keep this project reliable, up‑to‑date, and growing for everyone.


Star History Chart