Minimalist, zero-dependency synthesized audio & mobile haptics for modern web interfaces.
import { taptones } from 'taptones';
taptones.play({
frequency: 800,
endFrequency: 300,
duration: 0.05,
type: 'sine',
volume: 0.25,
haptic: 10
});
import { taptones } from 'taptones';
// One-liner presets
document.querySelector('#btn')
.addEventListener('click', () => {
taptones.click();
});
// Presets
taptones.pop();
taptones.success();
taptones.error();
'use client';
import { useTapTones } from 'taptones/react';
export function Button() {
const { click, sparkle } = useTapTones();
return (
<button onClick={() => sparkle()}>
Sparkle Action
</button>
);
}