Install from npm
1
Install the package
Install ios-haptics using your preferred package manager.
2
Import the library
Import You can also import
haptic into your module.supportsHaptics if you need to check device support at runtime.3
Use it
Call
haptic() on any user interaction. Use haptic.confirm() for success states and haptic.error() for errors.ios-haptics is ESM-only (
"type": "module" in package.json). Make sure your project supports ES modules before installing.