Give your web app a little tap of magicβadd native-style haptic feedback to every click.
npm install tactusimport { triggerHaptic } from "tactus";
export default function BuyButton() {
return <button onClick={() => triggerHaptic()}>Buy now</button>;
}triggerHaptic(duration?) fires one haptic pulse.
- No argument β 100 ms by default
- iPhone / iPad β Safariβs crisp βtickβ π₯
- Other browsers β falls back to the Vibration API π³
| Platform | Supported | Notes |
|---|---|---|
| iOS 12 + (Safari & web-views) | β | Native (switch) |
| Android 5 + | β | Vibrations API |
| Desktop | π« | Not supported yet |
MIT Β© 2025 Aadee
Made with β€οΈ by Aadee