Find your sound.
Browse by action, feedback, navigation, and more. Click a card to hear it and see its details.
Explore the libraryFrom finding a sound to making it yours.
Good feedback makes an interface easier to understand. Open Sounds gives you fourteen complete, carefully made cues for the moments that matter, from a tap to a task well done.
Audio is bundled with each package. No WAV copying, ZIP setup, or remote audio service.
Build the packages locally, then follow the guide for your platform.
pnpm install
pnpm run buildBrowse by action, feedback, navigation, and more. Click a card to hear it and see its details.
Explore the libraryInstall your platform’s package. All fourteen sounds come with it.
Install a packageCall a cue when something happens. React, Flutter, Compose, or SwiftUI. The same sound for the same moment.
Start buildingNative apps: Android / Jetpack Compose · iOS / SwiftUI
Use sounds as a dependency. All four packages each include all fourteen audio files; no manual WAV setup is needed.
Build the packages in this repository first:
pnpm install
pnpm run build:packages
Then add the React package to your app, adjusting the sibling checkout path:
pnpm add file:../open-sounds/packages/sounds-react
Use a file: dependency so the package resolves
your app's React peer dependency.
For Flutter, add a path dependency:
dependencies:
open_sounds:
path: ../open-sounds/packages/sounds_flutter
The source is at Try-Openbase/sounds. For
React, clone the repository, build it, and install its package
folder as shown above. Use the private repository root for
workspace development and the React package in your app.
git clone https://github.com/Try-Openbase/sounds.git open-sounds
cd open-sounds
pnpm install
pnpm run build:packages
Flutter supports a direct Git dependency with a package path. Pin a tag or commit for reproducible builds.
dependencies:
open_sounds:
git:
url: https://github.com/Try-Openbase/sounds.git
ref: main
path: packages/sounds_flutter
These registry commands become available after the packages are published. Until then, use a local or Git checkout.
# React
pnpm add @opensounds/react
# Flutter
flutter pub add open_sounds
The Flutter package includes every WAV, typed cues, persistent mute and volume, and cleanup. No manual audio asset setup.
Install open_sounds from a local path or GitHub, or
pub.dev after publication. The package declares all fourteen
assets for your app.
import 'package:flutter/widgets.dart';
import 'package:open_sounds/open_sounds.dart';
Future<SoundsPlayer> createSounds() async {
WidgetsFlutterBinding.ensureInitialized();
return SoundsPlayer.create();
}
Future<void> preview(SoundsPlayer sounds) async {
await sounds.play(SoundCue.tap);
await sounds.setVolume(0.5);
await sounds.setEnabled(false); // stops and remembers mute
}
// When the owning app or service is finished:
// await sounds.dispose();
Keep one player in your app or owning service. Connect a visible
sound setting to setEnabled. Handle initialization
and playback failures in your UI.
The provided hook handles one sound at a time, saved settings, and component cleanup.
Add @opensounds/react from your local checkout, or
the registry after publication. Every cue is bundled in the package.
import { useState } from 'react';
import { useSounds } from '@opensounds/react';
export function PreviewButton() {
const sounds = useSounds();
const [status, setStatus] = useState('');
return <>
<button disabled={!sounds.ready} onClick={() => {
void sounds.play('tap').catch(() =>
setStatus('Sound is unavailable.'));
}}>Preview tap</button>
<label>
<input type="checkbox" checked={sounds.enabled}
onChange={e => sounds.setEnabled(e.target.checked)} />
Sound
</label>
<p role="status">{status}</p>
</>;
}
Use setVolume(0.5) to change loudness and
stop() to stop a cue. Mute and volume save to
browser storage when available.
Fourteen typed, offline one-shots with persistent mute and volume. Every WAV is included in the dependency.
Run pnpm run build in this checkout first. Native packages have not been published.
// settings.gradle.kts: adjust your checkout path
include(":open-sounds")
project(":open-sounds").projectDir = file("../open-sounds/packages/sounds-android")
// app/build.gradle.kts
dependencies { implementation(project(":open-sounds")) }Android API 23+. Requires Gradle 8.11.1, JDK 17, and SDK 35. The module pins AGP 8.9.2 and Kotlin 2.1.20; align host plugin versions. The example uses Material 3. rememberSoundsPlayer stops on pause and closes on leaving composition. Outside Compose, call close() on disposal. Use the player on the main thread.
package dev.opensounds.example
import androidx.compose.foundation.layout.Column
import androidx.compose.material3.Button
import androidx.compose.material3.Slider
import androidx.compose.material3.Switch
import androidx.compose.material3.Text
import androidx.compose.runtime.*
import dev.opensounds.SoundCue
import dev.opensounds.rememberSoundsPlayer
/** Add to an existing Material 3 Compose app. */
@Composable
fun SoundsDemo() {
val sounds = rememberSoundsPlayer()
var status by remember { mutableStateOf("Choose a sound") }
Column {
Text(status)
Text("Sound enabled")
Switch(checked = sounds.enabled, onCheckedChange = { sounds.setEnabled(it) })
Text("Volume: ${(sounds.volume * 100).toInt()}%")
Slider(value = sounds.volume, onValueChange = { sounds.setVolume(it) })
for (cue in SoundCue.entries) {
Button(onClick = {
status = if (sounds.play(cue)) "Played ${cue.name}" else "Sound muted or unavailable"
}) { Text(cue.name) }
}
}
}
setEnabled(false) saves mute and stops playback. setVolume saves finite loudness clamped to 0–1 and updates active audio. stop() releases the active cue. Playback replaces the previous cue and never loops. Keep visible feedback when muted or unavailable.
Full example: packages/sounds-android/example/SoundsDemo.kt.
Fourteen typed, offline one-shots with persistent mute and volume. Every WAV is included in the dependency.
Run pnpm run build in this checkout first. Native packages have not been published.
// Xcode: File → Add Package Dependencies → Add Local
// Select packages/sounds-ios and add the OpenSounds product.
import OpenSoundsiOS 15+ and Swift tools 5.9+. Choose the package subdirectory rather than the repository root. Own SoundsPlayer with @StateObject on the main actor. Stop when your view disappears or scene becomes inactive. Playback follows the host audio-session policy and respects the silent switch with the default session.
import OpenSounds
import SwiftUI
public struct SoundsDemo: View {
@StateObject private var sounds = SoundsPlayer()
@Environment(\.scenePhase) private var scenePhase
@State private var status = "Choose a sound"
public init() {}
public var body: some View {
Form {
Text(status).accessibilityAddTraits(.updatesFrequently)
Toggle("Sound enabled", isOn: Binding(
get: { sounds.enabled }, set: { sounds.setEnabled($0) }))
Slider(value: Binding(get: { sounds.volume }, set: { sounds.setVolume($0) }),
in: 0...1) { Text("Volume") }
ForEach(SoundCue.allCases) { cue in
Button(cue.rawValue.capitalized) {
do {
status = try sounds.play(cue) ? "Played \(cue.rawValue)" : "Sound muted or unavailable"
} catch {
status = "Sound unavailable: \(error.localizedDescription)"
}
}
}
}
.onDisappear { sounds.stop() }
.onChange(of: scenePhase) { phase in
if phase != .active { sounds.stop() }
}
}
}
setEnabled(false) saves mute and stops playback. setVolume saves finite loudness clamped to 0–1 and updates active audio. stop() releases the active cue. Playback replaces the previous cue and never loops. Keep visible feedback when muted or unavailable.
Full example: packages/sounds-ios/Examples/SoundsDemo.swift.
Fourteen cues, each naming an interface job. One finished sound for each little moment.
| Cue | When to use it |
|---|---|
| tap | Buttons, links, and direct activation |
| type | Text entry and keystrokes |
| select | Choosing an option |
| toggle | Switching a setting or state |
| open | Opening a menu, drawer, or dialog |
| close | Closing or dismissing |
| navigate | Moving between views |
| success | A confirmed completion |
| warning | An outcome that needs a look |
| error | A failure or refusal |
| loading | A brief cue when work begins |
| ready | A result that is ready |
| attention | A notification that needs a response |
| count | A number animating to a new value |
The collection gives each interaction one consistent sound. Pick the cue that matches the job and adjust your player volume to fit your app.
The audio distribution uses the MIT license. Keep its included copyright and license notice when redistributing the sounds. The full notice is included in each package.
All WAVs are one-shots. They do not loop or adapt to typing speed, input device, or animation duration.