UI Sounds for Bootstrap 6. Subtle Web Audio API feedback for every interactive Bootstrap component, with no audio files to load.
[!NOTE] This version targets Bootstrap 6.0.0-alpha.1. Bootstrap 6 renamed several components (Modal is now Dialog, Offcanvas is now Drawer, Dropdown is now Menu), so Bootstrap 5 projects should stay on v0.0.3.
Bootstrap 6’s JavaScript is ESM-only, so load it with type="module". Then add the UI sounds script:
<script
type="module"
src="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha.1/dist/js/bootstrap.bundle.min.js"
></script>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap-ui-sounds/js/bootstrap-ui-sounds.min.js"
defer
></script>
Sounds are off by default. Turn them on by adding data-ui-sounds to <html>, <body>, or any component:
<html lang="en" data-ui-sounds="true"></html>
Set data-ui-sounds="false" on an element to mute it and everything inside it.
<details>) and details/summary