Give Your Web UI a Voice. Without Shipping a Single MP3.
Modern SaaS apps deserve rich tactile feedback. Tonely synthesizes clean, pleasant micro-interactions at runtime with zero external audio files, zero HTTP requests, and zero network latency.
The Tonely Soundboard
Audition every procedural preset in real-time. Tweak sound palettes, master volume, and pitch multiplier.
Success (200 OK)
Pleasant rising major chord arpeggio for saved records & mutations
tonely.success()Error (4xx / 5xx)
Gentle dissonant double-tone for invalid inputs & server errors
tonely.error()Warning
Dual-tone attention cue for unsaved changes & critical warnings
tonely.warning()Info Ping
Soft crisp sine chime for notifications, tooltips & badges
tonely.info()Tactile Click
Ultra-fast micro transient (25ms) for buttons, tabs & nav links
tonely.click()Bubble Pop
Bouncy upward frequency sweep for modal opens & dropdowns
tonely.pop()Switch Toggle
Dual-direction tone: rises when enabled, drops when disabled
tonely.toggle()Delete / Trash
Soft muted descending double-tone for record removals
tonely.delete()Crystal Glass
High-resonance crystalline shimmer with bandpass resonance
tonely.glass()Liquid Drop
Organic modulated water droplet sound for likes & reactions
tonely.bubble()AI Prompts Hub for Cursor, Claude & v0
Copy and paste these pre-crafted instructions directly into Cursor Composer, Claude 3.7, v0, ChatGPT, or Antigravity to instrument your entire application in seconds.
Integrate Tonely with Sonner & Shadcn UI
Wrap your existing toast notifications to automatically trigger harmonic procedural sounds.
I want to integrate 'tonely' into my Next.js / React project. Please install 'tonely' and wrap my toast helper (Sonner / Shadcn UI) so that: - toast.success() plays tonely.success() - toast.error() plays tonely.error() - toast.warning() plays tonely.warning() - toast.info() plays tonely.info() Ensure it is 100% SSR-safe and works seamlessly inside client components.
Sound Feedback for Next.js Server Actions & Forms
Add instant tactile feedback on form submit, success on 200, error on failure.
Please update my form submissions and Next.js Server Actions using 'tonely':
1. When the user clicks the submit button, trigger tonely.click()
2. If the Server Action returns success or HTTP 200, play tonely.success()
3. If the Server Action returns validation errors or fails, play tonely.error()
Import { tonely } from 'tonely' and keep all audio calls strictly client-side.Automatic Fetch / Axios Response Status Interceptor
Automatically chime on any API call depending on HTTP status code.
I am using fetch / TanStack Query in my web app. Please configure a centralized helper using 'tonely' that maps HTTP responses: - Status 2xx -> tonely.fromStatus(response.status) [success chime] - Status 4xx / 5xx -> tonely.fromStatus(response.status) [gentle error tone] Ensure audio playback is smooth, non-blocking, and respects user gestures.
Add Micro-interactions to Buttons & Modals
Enhance navigation, dialogs, and toggle switches with responsive micro sounds.
Enhance my UI components using the 'tonely' library: - Add tonely.click() to primary action buttons and tab switches - Add tonely.pop() when modals or dropdown menus open - Add tonely.toggle(activeState) to switches and checkboxes - Add tonely.delete() when deleting items Keep it clean, subtle, and responsive with zero external audio assets.
Clean Integrations Across Any Stack
Works server-side (Next.js SSR / Server Components / Actions) as a safe no-op, and client-side across React, Vue, Svelte, and Vanilla JS.
'use client';
import { useTonely } from 'tonely/react';
export function CheckoutButton() {
const { success, error, click } = useTonely({ theme: 'glass' });
const handleCheckout = async () => {
click(); // Instant tactile response on click
try {
await processPayment();
success(); // 🎶 Harmonic rising chime
} catch (err) {
error(); // ⚠️ Gentle warning double-tone
}
};
return (
<button onClick={handleCheckout} className="btn-primary">
Complete Purchase
</button>
);
}Why Procedural Web Audio API Wins
A side-by-side comparison between conventional MP3 asset hosting and Tonely.
| Metric | External Audio Files (MP3 / WAV) | Tonely (Procedural) |
|---|---|---|
| Total Asset Download | 50 KB – 300 KB+ | 0 KB (Zero assets!) |
| Library Size (gzipped) | ~15 KB (Howler) + Assets | ~2.5 KB |
| First-Sound Latency | 120ms – 450ms (Network Lag) | < 1ms (Instant synthesis) |
| Server-Side Safety (SSR) | Throws without "window" guards | 100% Isomorphic Safe No-op |
| Dynamic Pitch & Themes | Requires separate audio tracks | Mathematical realtime adjustment |
Frequently Asked Questions
Everything you need to know about procedural Web Audio API synthesis and Tonely architecture.
How does Tonely synthesize UI sound effects without MP3 or WAV files?
Tonely uses the browser's native Web Audio API oscillators, biquad filters, and exponential gain ramps. Instead of loading static audio media files over the network, every chime, click, pop, and tone is computed mathematically at runtime in microseconds.
Why is procedural Web Audio better than traditional audio assets?
Traditional audio assets require HTTP network requests that introduce 120ms to 450ms of network latency on the first play, consume bandwidth, and introduce cross-origin and asset-path headaches. Tonely has 0 KB audio assets, triggers with < 1ms latency, and adds about 2.5 KB gzipped to your total bundle.
Is Tonely safe for Next.js SSR, React Server Components, and Server Actions?
Yes. Tonely is 100% isomorphic and SSR-safe. In server environments (such as Node.js, Next.js Server Components, or Edge runtimes) where window and AudioContext are undefined, Tonely gracefully acts as a silent no-op without throwing errors or breaking hydration.
How does Tonely handle browser autoplay audio policies?
Modern browsers require a user interaction (like a click, tap, or keypress) before permitting audio output. Tonely automatically manages AudioContext state, resuming suspended contexts upon user gestures so sound feedback plays cleanly without developer boilerplate.
Can I map sound effects directly from HTTP status codes?
Yes. Tonely provides tonely.fromStatus(statusCode) and tonely.wrapFetch(). An HTTP 200/201 response automatically triggers a harmonic success chime, while 4xx and 5xx errors trigger gentle warning double-tones.
What is the bundle size impact of Tonely?
Tonely has zero runtime dependencies and is about 2.5 KB gzipped (about 8 KB minified). It is significantly smaller than a typical single icon SVG or standard audio library like Howler.js.