@hugocxl/sounds
55 multi-sampled tactile button, keyboard, mouse, gamepad, and toggle recordings
for the web, powered by Josh W. Comeau's Button Sounds (MIT).
import { press, release, wireUp, haptic } from "@hugocxl/sounds";
// Imperative press & release
button.addEventListener("pointerdown", () => press("uhk-soft"));
button.addEventListener("pointerup", () => release("uhk-soft"));
// Or wire both events at once
const unwire = wireUp(button, "hi75-medium", { pitchVariation: 0.08 });
// iOS-style haptics
haptic("success");
- Zero runtime dependencies — decodes bundled
.mp3 sprites directly with Web Audio.
- 4–8 recorded press/release pairs per sound so repeats never feel robotic.
- Safe to import during SSR; audio only starts on a user gesture.
Full documentation and interactive soundboard: https://hugocxl.github.io/stack/sounds/
All audio recordings are Copyright (c) 2026-present Josh Comeau (MIT License). See NOTICE.