React Native Haptics
A high-performance React Native library for iOS haptics and Android vibration effects.
@mhpdev/react-native-haptics is a high-performance React Native library for iOS haptics and Android vibration effects.
Features
- High performance — built with Turbo Modules for Android and iOS.
- Essential methods — provides the methods you need for triggering native haptic feedback.
- Android-specific effects — supports a wide range of Android vibration effects through
androidHaptics. - Easy to use — a simple API with a default
Hapticsobject. - Instant feedback — executes on the UI thread to ensure instant feedback.
- Type safety — fully type-safe and written in TypeScript.
Compatibility
| Requirement | Value |
|---|---|
| Architecture | New Architecture (Turbo Modules) only. React Native 0.76+ has it enabled; 0.68–0.75 require manual setup. |
| React Native | New Architecture compatible versions (see above) |
| iOS | Uses your app's min_ios_version_supported from React Native. soft and rigid impact styles require iOS 13.0+. |
| Android | minSdk 21 (library default, overridable). Several androidHaptics effects require API 23/27/30/34 and fall back to virtual-key when unsupported. |
| Expo | Supported with prebuild; not supported in Expo Go |
| Language | TypeScript with bundled type definitions |
Next steps
- Installation — add the package to your project.
- Quick start — trigger your first haptic.
- Benchmarks — measured performance versus
expo-haptics. - Releases — version history and changelogs on GitHub.