The live demo starts when it’s in view.Click once to start audio, then use the controls or the pads · the scope draws each sound, even when muted
Twelve interface sounds made live with the Web Audio API, no audio files.
What it costs a frame
CPU
<0.01 ms
02468101216.7 ms
GPU
not used
CPU, median
<0.01 ms
CPU, 95th pct
<0.01 ms
Draw calls
0
Weight
Light
Measured 3 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 156, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured idle: the bench run has no user gesture, and headless Chrome as the bench launches it keeps an AudioContext suspended without one (checked), so no sound can play. The cost of a sound is a few short-lived Web Audio nodes; the mixing runs on the browser’s audio thread, outside the frame. Phones: tiers are being measured next.
apple · Apple A19 Proin a browser tab · 16 November 2026
not timed
<0.01
<0.01
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026
not timed
<0.01
0.01
Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.
What it needs
Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages
What it’s for
Buttons, switches and sliders that feel physical
Save, success and error feedback
Notifications and chat
Games and playful tools
Kiosks and touch screens
Dashboards that need a quiet alert
Pitfalls, in brief
Browsers keep an AudioContext suspended until the page has had a click, a tap or a key press.
On touch, pointerdown does not count as a gesture: the module also listens to pointerup, touchend and click, so the first tap starts audio, but the very first press sound of that tap is lost.
UI sounds are an extra, never the only feedback: anything a sound says (it saved, it failed, a message arrived) must also show on screen, for people who are deaf or have sound off.
Sounds should be opt-in in most apps: give the app a "Sounds" setting that starts off (or on only where sound is expected, such as games) and pass it as enabled.
Reduced motion does not mute the sounds: it is a preference about movement, and people who reduce motion may rely more on sound.
3 more in brief
Keep them short and quiet: under 100 ms for controls, under 1 s for anything, and well below other media.
Each play builds a few Web Audio nodes; they are freed when they finish.
stop() closes the AudioContext: browsers limit how many a page may have, so make one system per app, not one per component.
8 pitfalls in full, the hook-up guide, the module source and its tests come with the part.
Where it comes from
From HaTac. Fully custom code.
web audiosound designfeedbacksynthesisaccessibilityreduced motiondomno dependencies
A small appearance system: colour presets as CSS variables (light, dark, two high-contrast, two accent looks), a “Match system” choice that follows the…