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-sounds/v/1Pinned: v1 never changes, even when the collection is updated. 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/bright-success-chime");ui-sounds/bright-success-chime
ui-sounds/crisp-snap
ui-sounds/hard-checkbox-click
ui-sounds/soft-checkbox-tick
ui-sounds/soft-panel-whoosh