UI SFX: semantic sound cues for web interfaces, with twelve swappable packs and no audio fetching
UI Sound Effects for your interfaces
At a glance
- What is it?
- romainsimon/uisfx is a MIT-licensed library of interface sounds that you trigger by meaning, such as success or processing, instead of by file name. The audio is synthesized in the browser, so the catches are autoplay unlocking, loops you must stop yourself, and sounds that only ship as part of the npm package.
- Who is it for?
- UI SFX fits web and app teams that want consistent click, success and loading sounds mapped to events, with the option to swap the whole tone by changing a pack name. It is the wrong tool if you need a sound outside its 78 cues, or if you cannot guarantee a user interaction before the first sound.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 75 days ago.
- What is it written in?
- Mainly Vue, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.
Star history
- romainsimon/uisfx953 ★ · +151
| Repository | 2026-09-17 | 2026-11-22 |
|---|---|---|
| romainsimon/uisfx | 802 | 953 |
151 Stars in the last 66 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Product events map to named cues, and the pack decides what you hear
The central idea is a separation of intent from timbre. A file called soft-pop-03.mp3 forces every product to invent its own meaning for it. UI SFX instead gives you 78 semantic cues in 13 interaction categories, with names such as success, drop and level-up. You call the cue, and the active sound pack decides how it sounds.
There are 12 complete packs, and every pack implements every cue. That is what lets you change personality without touching interaction code:
import { createUISFX } from 'uisfx'
const ui = createUISFX({ pack: 'minimal', preferences: {} })
// Call from the first trusted pointer or keyboard action.
await ui.unlock()
saveButton.addEventListener('click', () => {
ui.play('success')
})
// Loops continue until their interface state resolves.
const processing = ui.play('processing')
processing?.stop()
// Change personality without changing product logic.
ui.setPack('arcade')The flip side is that the taxonomy is the contract. The 78 cues are listed in docs/taxonomy.md, and if your product needs a sound that does not map to one of them, the library does not give you a way to name it.
The first sound needs a trusted interaction, because the AudioContext is created lazily
Browsers refuse to start audio before a user acts, and UI SFX is built around that. It creates its AudioContext lazily, and you call unlock() from the first trusted pointer or keyboard action, as the example above shows. After that, it synthesizes deterministic recipes locally and caches the rendered buffers. No audio files are fetched at runtime.
That design has two consequences. There is no network request when a sound plays, so a missing file cannot cause silence, and the runtime is 12.0 kB compressed with zero dependencies. But if you call play before any real interaction, a page that loads and tries to chime on its own will stay silent. Design your first sound around a click, tap or key press.
The included agent prompt covers autoplay constraints along with cue mapping, loop cleanup, mute preferences, accessibility and verification, and it is offered as a prompt or an integration guide for a coding agent. It is a prompt hosted on the project site, not code that ships in the npm package.
Loops keep playing until your code stops them
Cues come in two shapes. There are 72 brief one-shots for discrete outcomes such as a selection, drop, purchase, success, warning or error. There are also six seamless state loops: loading, processing, recording, connecting, scanning and streaming. A loop is meant to track a visible state and end when that state succeeds, fails or is cancelled.
const recording = ui.play('recording')
stopButton.addEventListener('click', () => {
recording?.stop()
ui.play('complete')
})The handle returned by play can be undefined, hence the optional chaining. The responsibility for stopping sits with you. If a request errors out and your error path never calls stop, the loop keeps going, which is an annoying bug to find in a long async flow.
The player has some guardrails. It defaults to eight voices, deduplicates loops, restarts repeated outcomes and rate-limits high-frequency cues. When you switch packs, active loops move into the new pack without invalidating their handles, so a stop call made after a pack change still works.
Mute and volume are your job, and preferences land in localStorage
The accessibility notes are firm: sound should reinforce visible feedback, never replace it. They ask for a persistent mute setting, respect for device volume, no audio-only distinction between success, warning and error, quiet or disabled hover feedback in dense interfaces, and audio started only after an explicit interaction.
The controls are three calls:
ui.setEnabled(false)
ui.setVolume(0.5)
ui.stopAll()Passing preferences: {} stores the pack, volume and enabled state in localStorage. If you are in a native shell or want your own preference store, a custom storage adapter is supported. The library does not draw a settings control for you, so you build the toggle yourself.
One detail helps with heavy pages. preload() yields between cues and accepts an AbortSignal, so preparing sounds does not hog a single browser task, and you can cancel it if the user navigates away.
HTML data attributes bind sounds without script glue, but need a matching unbind
For markup-driven pages there is bindUISFX, which wires elements by attribute:
import { bindUISFX } from 'uisfx'
const { player, unbind } = bindUISFX()<a data-uisfx-hover="hover">Documentation</a>
<button data-uisfx-press="press" data-uisfx-release="release">Hold me</button>
<button data-uisfx="success" data-uisfx-pack="soft">Save</button>There are separate attributes for hover, press and release, and a per-element pack attribute lets one button use a different personality than the rest of the page. The call returns the player and an unbind function. The project says to call unbind() when a client-rendered view is destroyed. Skip it in a single-page app and the listeners from the destroyed view remain, so a component that mounts and unmounts repeatedly can leave bindings behind.
The npm package carries ready-made MP3 and Ogg files for apps without Web Audio
Separate from the synthesizing runtime, the package includes sounds/{pack}/{cue}.mp3 and sounds/{pack}/{cue}.ogg. These are meant for React Native, Swift, Kotlin, Unity, Godot, video, and any environment without Web Audio. In a bundler you can import one directly:
import successUrl from 'uisfx/sounds/soft/success.mp3?url'
const success = new Audio(successUrl)
await success.play()The library totals 936 original sounds in both formats. Every MP3 together is 5.18 MB and every higher-fidelity Ogg together is 3.82 MB. A uisfx/manifest export lists each exact path, byte size, rendered duration, channel count, loop flag, default volume, cue, category and pack, so a native build script can pick out only the files it needs rather than bundling everything.
The licensing is split by asset type: MIT for the code, and CC0 for the audio and the sound pack art, with LICENSE-AUDIO and LICENSE-ART files in the repository. Install with:
npm install uisfxBuilding from source regenerates every file and needs ffmpeg and a browser
The checked-in sounds are reproducible from deterministic synthesis recipes. To rebuild them:
npm install
npm run generate
npm run checkThis needs Node 22.20 or later, Chrome or Chromium, and ffmpeg. The workspace package.json pins engines to ^22.20.0 || ^24.11.0 || >=26.0.0, and the check script chains privacy check, generation, audio quality, agent docs check, typecheck, tests, build, audio report, package budget and browser conformance. The full gate validates audio size, decoded peaks, tail silence, loop timing, seam continuity, pairwise similarity, runtime size, browser unlocking, cooperative preload and preference restoration. Changes to recipes also follow a listening protocol in docs/listening-protocol.md.
That is a heavy requirement for a casual contributor, and npm run check cannot pass on a machine without ffmpeg or a Chromium install. The root package is private and named uisfx-workspace, with apps and packages as workspaces; the showcase site reads NUXT_PUBLIC_SITE_URL from an .env.example file for its canonical and social metadata.
There are no GitHub releases, so versions come from npm and the changelog
The repository is not archived and the last push was on 2026-09-08. It publishes no GitHub releases, so there are no tags or release notes to pin against there. Check the npm package page and CHANGELOG.md in the repository to see what changed between versions.
The README presents sponsorship as what keeps the project free, open and maintained, with a sponsors section linking to GitHub Sponsors. The workspace version field reads 0.1.0, but that is the private root package, not the published uisfx package, so it will not tell you which uisfx version you have installed.
Editorial conclusion
UI SFX fits web and app teams that want consistent click, success and loading sounds mapped to events, with the option to swap the whole tone by changing a pack name. It is the wrong tool if you need a sound outside its 78 cues, or if you cannot guarantee a user interaction before the first sound. Before shipping, wire the mute setting and loop cleanup, since both are left to your code.
Frequently asked questions
What does SFX stand for in UI SFX?
The project describes itself as open-source interface sound effects for every product state. In this library the term refers to short sounds and loops played on interface events such as success, drop or level-up.
What is UI in audio, according to UI SFX?
UI SFX treats it as sound effects for interfaces, covering web apps, mobile apps, SaaS, education, media and games. Sounds are tied to semantic cues, and the active pack decides how each one sounds.
What sounds do UI SFX interface sounds make?
The library has 78 semantic cues in 13 interaction categories, including 72 one-shots such as success and drop, and six loops: loading, processing, recording, connecting, scanning and streaming.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/romainsimon-uisfx)Star history chart for your README
[](https://hysenlabs.com/projects/romainsimon-uisfx)Was this useful?