NewMore sounds on openfoley→

Add Sound Effects to Your React Apps Effortlessly

react-sounds provides a library of ready-to-play sound effects with a simple API, lazy loading, and offline support.MIT License

npm install react-sounds howler

Key Features

🔊 Extensive Library

Access curated sounds organized by category (UI, notification, game, etc.).

ðŸŠķ Lightweight

Only JS wrappers included in the package. Audio files are hosted on a CDN to keep your bundle size small.

🏗ïļ Lazy Loading

Sounds are fetched efficiently only when they are needed, improving initial load performance.

ðŸ“Ķ Offline Support

Easily download and bundle sounds for self-hosting using the included CLI tool.

ðŸŽŊ Simple API

Integrate sounds effortlessly with easy-to-use hooks (like useSound) and components (like SoundButton).

⚙ïļ Configurable

Customize CDN URLs, preload sounds, enable/disable sounds globally, and control playback options.

Interactive Sound Demo

Basic Usage

Click the buttons to hear different sound effects.

import { useSound } from 'react-sounds';

function Button() {
  const { play } = useSound('ui/button_soft');
  return <button onClick={play}>Click Me</button>;
}

Advanced Controls

Try adjusting these parameters before playing the sound.

Status: Loading, Stopped

Sound Effects Categories

Notification Sounds

Ideal for alerts, confirmations, and system events

Game Sounds

Great for achievements, collectibles, and game events

UI Sounds

Perfect for buttons, toggles, and interface interactions

Need more sounds?

openfoley is an open library of sound effects and sound packs made for react-sounds. Every sound is free to use under CC0, and you can generate new ones with AI.

Browse openfoley
npx react-sounds-cli add https://openfoley.com/c/ui-sounds

Ready to add sounds?

Check out the documentation or install the library now.