1.0.5 â€Ē Published 4 months ago

react-native-turbo-haptics v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

🌀 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

1.0.5

4 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago