Skip to content
Tonely logo
Open-source developer tool

Tonely — zero-asset UI sound design system for modern web.

An ultra-lightweight (< 1.5 KB) procedural sound library built on the browser's Web Audio API. Delivers tactile multi-sensory feedback with zero MP3/WAV assets, sub-millisecond latency, and 100% SSR safety for Next.js, React, and Vue.

Tonely procedural sound effects library preview

Zero Audio Assets

< 1.5 KB Bundle

Web Audio API

Sub-1ms Latency

100% SSR-Safe

Zero Dependencies

Modern & Glass Themes

Next.js & React Ready

The Problem

Modern web applications are visually polished but completely silent. Adding micro-interaction audio traditionally requires bundling heavy MP3/WAV assets, causing network latency (200-400ms), asset caching bugs, SSR hydration crashes in Next.js, and browser autoplay blocking policies.

The Solution

Tonely synthesizes every chime, click, ping, and notification procedurally in runtime using the browser's native Web Audio API. With zero external audio files and less than 1.5 KB bundle size, it produces tactile, multi-sensory feedback with instant < 1ms latency.

Quick Start Example
import { tonely } from "tonely";

// 1. Play instant procedural notification sounds:
tonely.success(); // Pleasant rising chime (200 OK)
tonely.error();   // Gentle error tone (4xx / 5xx)

// 2. Play tactile micro-interaction audio:
tonely.click();   // Crisp 25ms button tap
tonely.glass();   // Apple-like glass ping
tonely.toggle();  // Switch toggle feedback

// 3. Auto-play based on API response status:
const res = await fetch("/api/checkout", { method: "POST" });
tonely.fromStatus(res.status); // 200 -> success, 400+ -> error
Architecture Note

Tonely uses pure mathematical procedural synthesis (sine, square, triangle oscillators, gain envelope ADSR ramping, and resonant biquad filters). It creates zero HTTP network requests, guarantees 100% SSR-safety with graceful fallbacks, and handles browser audio unlock policies automatically.

Features
Procedural audio synthesis via Web Audio API
Zero audio assets (0 MP3/WAV files)
Sub-millisecond latency (< 1ms instant playback)
Tiny footprint (< 1.5 KB gzipped, zero dependencies)
100% SSR-safe & Next.js 14/15 App Router ready
Ready chimes: success, error, warning, info, click, pop, glass, toggle
Built-in HTTP status mapper (fromStatus(200))
Sound themes (modern, glass, minimal, playful, retro)
TypeScript declarations & full tree-shaking support
Automatic AudioContext lifecycle & browser policy handling
Developer Value
Zero CDN asset hosting or audio file management
Instant tactile feedback makes apps feel like native Stripe / Linear quality
Zero hydration issues or window undefined crashes on the server
Effortless drop-in for toast notifications, modals, and CTA buttons
Elevates user delight and multi-sensory feedback with 1 line of code