Button Sounds: free library of 50+ recorded button click sounds with an NPM package
Button Sounds is a free collection of more than 50 professionally recorded clicks and toggles, distributed as an NPM package with optional React bindings. Each sound has several recorded samples (at least 8, with 4 for pressing and 4 for releasing), and a random one plays on every press and release, which the author calls [multi-sampled](1) sound. The wireUp function attaches a sound to a button, preloads the audio file, handles press and release events, and can add pitch variation and a lo-fi, NES-style bit reduction.
By default the audio files load from the [CDN](2) JSDelivr, and only the sounds you select are downloaded. The package adds about ~3kB [gzip](3) to a bundle, plus Howler, a ~10kB JavaScript library for playing sounds, which loads asynchronously. A lower-level API exposes load, press and release functions for custom triggers, and React hooks cover both approaches.
Browsers can block a website from playing sound, and iOS Safari is especially strict, so the author suggests trying a desktop computer if no click is heard.
Read the original buttons.joshwcomeau.comDiscussion
Discussion
Commenters praise the sound quality, the design and the free access. One reports that the page uses about half of their CPU and makes the browser lag, while another suggests removing pitch shifting and keeping only timbre variation. Another commenter says that setting navigator.audioSession.type to "playback" lets sounds play on iOS even in silent mode.
Links from the post and discussion
- One Million Checkboxes, a similar project mentioned in comments onemillioncheckboxes.com
- Workaround for playing audio on iOS, linked in a comment github.com
Sources
-
buttons.joshwcomeau.com
Button Sounds – collection of professionally-recorded button clicks and presses
-
KRGeekNews KO
Button Sounds - 전문적으로 녹음한 버튼 클릭과 누름 소리 모음
Terms
- multi-sampled — A sound recorded several times, so that each trigger plays a randomly chosen take instead of the same recording.
- CDN — Content delivery network: a set of servers that deliver files such as scripts and audio to users from locations close to them.
- gzip — A compression method that makes files smaller so they download faster.


