1. Install react-sounds and add the pack with its CLI
npm i react-sounds howler
npx react-sounds-cli add https://openfoley.com/c/ui-soundsInstalls the latest version; run the command again to update. Pin a version if your app needs sounds that never change. Add --download to copy the files into your project.
2. Register it and play sounds by name (names autocomplete)
import uiSounds from "./sounds/ui-sounds.json";
<SoundProvider packs={[uiSounds]}>…</SoundProvider>
const { play } = useSound("ui-sounds/airy-message-swoosh");ui-sounds/airy-message-swoosh
ui-sounds/bright-success-chime
ui-sounds/camera-shutter-click
ui-sounds/clicky-mechanical-keystroke
ui-sounds/crisp-snap
ui-sounds/fast-airy-message-swoosh
ui-sounds/gentle-chat-ping
ui-sounds/hard-checkbox-click
ui-sounds/metal-coin-drop
ui-sounds/paper-crumple-trash
ui-sounds/paper-page-turn
ui-sounds/soft-bubble-pop
ui-sounds/soft-checkbox-tick
ui-sounds/soft-error-chime
ui-sounds/soft-panel-whoosh
ui-sounds/triumphant-level-up-jingle