Browse the documentation

Haptic feedback plugin

2026-11-01· 3 min read· View as Markdown

Haptic feedback is the short vibration that confirms a tap, a success or an error. It's a small detail, but it's one of the things that make an app feel native rather than like a website. What the person feels depends on their phone and its settings.

Platforms

Included
  • Android
  • iOS

Used by the native builds: Android Build (Native), Android TV and iOS. The Android Build (Web) does not read these settings.

When to use it

  • A light tap on the main buttons
  • A success feedback when a form is sent
  • An error feedback when something fails
  • A soft tick when moving through a picker

Keep it for moments that matter. A vibration on every tap quickly gets annoying.

Set it up

  1. Add the plugin

    In your project's plugin library, add Haptic feedback, then launch a new build.

  2. Call it from your site

    Call each method optionally: it doesn't exist in a normal browser.

JavaScript API

const haptics = window.saastostore?.haptics;
await haptics?.impact({ style: "medium" });       // light | medium | heavy
await haptics?.notification({ type: "success" }); // success | warning | error
await haptics?.selection();                       // a light tick
await haptics?.vibrate({ duration: 200 });        // ms, 1 to 1000
// → { ok: true }
// → { ok: false, error: "invalid_argument" }     e.g. duration: 5000
// → { ok: false, error: "not_available" }        Android: the device plays nothing
MethodArgumentDefault
impactstyle: light, medium, heavymedium
notificationtype: success, warning, errorsuccess
selectionNoneNone
vibrateduration: 1 to 1000 ms300

iOS can't set a duration, so vibrate plays a strong impact. On Android, calls answer not_available when the device plays nothing, as on most tablets and TVs. iOS answers ok: true in that case.

Prompt for AI builders

Prompt for Lovable, Bolt or Base44

My website also runs inside a mobile app. Inside the app, window.saastostore?.haptics gives access to haptic feedback. In a normal browser it doesn't exist, and nothing must change.

Call it optionally: window.saastostore?.haptics?.impact(...). Its promise never rejects.

Call haptics.impact({ style: "light" }) when a main button is tapped, and haptics.notification({ type: "success" }) or ({ type: "error" }) after a form succeeds or fails.

Then test on a real phone. Emulators don't vibrate.

Frequently asked questions

Does it need a permission prompt?+

No. Android declares the vibrate permission in the app, and no prompt is shown.

Why don't I feel anything?+

The phone may have haptic feedback turned off, or no vibrator. On Android, the call then answers not_available.

Does it work in the Android Build (Web)?+

No. That build opens your site in Chrome, with no window.saastostore. Use the Android Build (Native).

See it with your own site

Paste your URL and get a free Android test build on your phone in about 3 minutes.

Publish now

Keep reading