What is Soundcn?
Soundcn is an open-source registry of curated UI sound effects designed to make adding audio feedback to web interfaces effortless. With over 700 high-quality sound effects—including clicks, notifications, transitions, and game sounds—you can enhance your React applications with just a single command.All sounds are sourced primarily from CC0-licensed collections (mainly Kenney), ensuring you can use them freely in your projects.
The Problem
Adding sound to web interfaces is traditionally tedious:- Hunt for free audio samples across multiple sources
- Deal with licensing uncertainties
- Wire up audio loading and playback logic
- Pull in heavy audio libraries for simple button clicks
- Handle CORS issues with external audio files
Key Features
700+ Curated Sound Effects
Browse a comprehensive collection of UI sounds including clicks, notifications, transitions, game sounds, and more. Each sound is carefully selected and categorized for easy discovery.
Single Command Installation
Install any sound with one command using the shadcn CLI. Sounds are copied directly into your codebase—not added as dependencies.
Zero Dependencies
Uses the native Web Audio API for playback. No external libraries required, keeping your bundle size minimal.
Base64 Data URIs
Each sound is a self-contained TypeScript module with an inline base64 data URI. No external files, no runtime fetching, no CORS issues.
Tree-Shakeable TypeScript
Import only the sounds you use. Unused sounds won’t be included in your production bundle.
How It Works
Soundcn integrates seamlessly with the shadcn ecosystem:- Browse - Visit soundcn.xyz to explore and preview sounds
- Install - Run the shadcn CLI command to copy the sound and hook into your project
- Import & Play - Use the provided
useSoundhook orplaySoundfunction
Sound Structure
Each sound is a TypeScript module that exports aSoundAsset object:
The base64 data URI contains the complete audio file, making each sound completely self-contained and portable.
Why Soundcn?
- No Build Configuration - Works out of the box with any React setup
- Type-Safe - Full TypeScript support with complete type definitions
- Flexible - Use in React components, vanilla JavaScript, or any framework
- Performant - Automatic audio buffer caching and reuse
- Developer Experience - Instant preview on the website, one-command installation
- Open Source - MIT licensed, hosted on GitHub
License Information
Most sounds in the collection are CC0 licensed, primarily from Kenney’s sound libraries. This means you can use them freely in commercial and personal projects without attribution (though attribution is always appreciated).Next Steps
Ready to add sound to your application?- Installation - Set up Soundcn in your project
- Quick Start - Build your first sound-enabled component
- Browse Sounds - Explore the full collection
