Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-native-turbo-haptics

christianbaroni311MIT1.0.5TypeScript support: included

Fast, worklet-compatible haptic feedback for React Native

react-native, ios, android, haptics, haptic-feedback, worklet, vibration

readme

🌀 Turbo Haptics

Fast, worklet-compatible haptic feedback for React Native.

Features

  • 🏎️ Zero-delay haptic feedback, powered by JSI
  • 🪄 Compatible with Reanimated and Gesture Handler worklets
  • 🎯 9 different haptic patterns (impact, notification, selection)
  • 📱 iOS and Android support
  • 🪶 Lightweight, zero dependencies

Installation

yarn add react-native-turbo-haptics
cd ios && pod install

Usage

import { triggerHaptics } from 'react-native-turbo-haptics';

// In any JavaScript context:
triggerHaptics('selection');

// In worklets:
Gesture.Tap()
  .onBegin(() => triggerHaptics('soft'));
// Available haptic types:
const HapticTypes = {
  impactHeavy: 'impactHeavy',
  impactLight: 'impactLight',
  impactMedium: 'impactMedium',
  notificationError: 'notificationError',
  notificationSuccess: 'notificationSuccess',
  notificationWarning: 'notificationWarning',
  rigid: 'rigid',
  selection: 'selection',
  soft: 'soft',
};

License

MIT