# joshwcomeau/use-sound

A React Hook for playing sound effects

Repository: https://github.com/joshwcomeau/use-sound
Canonical: https://ross.abutalabs.com/products/use-sound
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2025-06-10T15:41:12+00:00

## Health v2 (maintenance only)
Score: 34/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 26, release rhythm 8, longevity 100
- inputs: {"age_days": 2358, "days_push": 449, "days_rel": 561, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3148, forks 108 (observed 2026-08-28T04:07:46.080125+00:00)

## What it is
use-sound is a small React hook for playing sound effects in web applications, built on top of Howler.js. It provides a declarative API for loading and triggering audio on interactions like clicks and hovers.

## Use cases
- play a sound effect when a button is clicked
- add audio feedback on hover
- play sound effects in a React app
- trigger UI sounds declaratively with a hook
- load audio files asynchronously in React

## When to choose
- you need simple, lightweight sound effects in a React DOM app
- you want a declarative hooks API for audio playback
- bundle size matters and you only need basic sound triggering

## When to avoid
- you need advanced audio control like mixing, spatial audio, or complex playlists
- you're building a React Native app (use react-native-use-sound instead)
- you need active maintenance and support for edge cases

## Facets
- artifact type: library
- maturity: maintenance
- function: audio-processing, ui-components
- domain: web-development, frontend
- platform: browser
- tags: react-hook, sound-effects, howlerjs, audio-playback, audio, nodejs, javascript

## Member repositories
- joshwcomeau/use-sound (main) score 34

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:46.080125+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:45:35.358753+00:00, confidence not recorded.
  - readme: https://github.com/joshwcomeau/use-sound (fetched 2026-08-28T04:07:46.080125+00:00, sha 138aabc78bd8)
  - registry_npm: https://registry.npmjs.org/use-sound (fetched 2026-08-29T09:40:48.399631+00:00, sha bd3c5cf0414e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
