Skip to main content
ios-haptics works across iOS and Android, with graceful degradation on unsupported platforms.

Support matrix

Calls to haptic() on unsupported devices are safely no-ops — no errors are thrown and nothing breaks.

Feature detection

Use supportsHaptics to check for support before rendering haptic-related UI. This avoids showing UI hints on devices that will never fire a haptic.
supportsHaptics is true on any touchscreen device (iOS or Android) and false everywhere else, including SSR.

Testing

Haptics do not fire in the iOS Simulator. You must test on a real physical device.
Use the CodePen demo to test haptics on a real device without setting up a local dev server.