Bring mobile-like tactile experiences to your web applications with seamless haptic and audio feedback
Everything you need to add delightful haptic feedback to your web apps
Vibration patterns optimized for mobile devices, mimicking iOS and Android haptics perfectly
Automatic audio feedback on desktop browsers where vibration isn't available
Simple API with preset patterns - get started in seconds, not hours
Zero dependencies, ~6KB bundle size - no bloat, just pure performance
Full type definitions included for the best developer experience
Works with npm, pnpm, yarn, bun - all major browsers supported
Three simple steps to add haptic feedback to your app
Add superhaptic to your project using your favorite package manager
Import the library into your JavaScript or TypeScript file
Call superhaptic methods to add feedback to user interactions
npm install superhaptic
pnpm add superhaptic
yarn add superhaptic
bun add superhaptic
import superhaptic from 'superhaptic';
// Use preset patterns
superhaptic.preset('success'); // ✓ Vibrates or plays sound
// Custom pattern
superhaptic.vibrate(50); // Single 50ms vibration
// Control
superhaptic.disable(); // Turn off
superhaptic.enable(); // Turn on
Join thousands of developers building better experiences
"Superhaptic transformed our mobile web experience. Users love the tactile feedback - it feels native!"
"The API is so simple yet powerful. Added haptics to our entire app in under an hour. Game changer!"
"Finally, a haptic library that just works. Zero config, TypeScript support, and it's tiny. Perfect!"
Click the buttons below to experience superhaptic in action
button.addEventListener('click', () => {
superhaptic.preset('light');
// Handle click...
});
if (isValid) {
superhaptic.preset('success');
submitForm();
} else {
superhaptic.preset('error');
showErrors();
}
toggle.addEventListener('change', (e) => {
const intensity = e.target.checked ? 20 : 10;
superhaptic.vibrate(intensity);
});
function showNotification() {
superhaptic.preset('notification');
toast.show('New message!');
}
// [vibrate, pause, vibrate, pause, ...]
superhaptic.vibrate([50, 100, 50, 100, 50]);
// Complex rhythm
superhaptic.vibrate([10, 50, 20, 50, 30]);
Start adding delightful haptic feedback to your web applications today
Get Started for Free