browser-haptic

Lightweight haptic feedback for the web. Vibration API + iOS Safari 17.4+ fallback.

Try it

Tap the buttons below. Best experienced on a real device (Android or iOS Safari 17.4+).

Install

npm i browser-haptic

Usage

import Haptic from "browser-haptic";

const MyButton = () => (
  <button onClick={() => Haptic.heavy()}>
    Tap me
  </button>
);

if (Haptic.isSupported()) {
  Haptic.success();
}