https://github.com/christianbaroni/react-native-turbo-haptics
Fast, worklet-compatible haptic feedback for React Native ð
https://github.com/christianbaroni/react-native-turbo-haptics
android haptic-feedback haptics ios react-native reanimated worklets
Last synced: about 1 month ago
JSON representation
Fast, worklet-compatible haptic feedback for React Native ð
- Host: GitHub
- URL: https://github.com/christianbaroni/react-native-turbo-haptics
- Owner: christianbaroni
- License: mit
- Created: 2024-11-12T03:03:03.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-03-12T18:02:16.000Z (2 months ago)
- Last Synced: 2025-03-29T14:05:09.633Z (about 2 months ago)
- Topics: android, haptic-feedback, haptics, ios, react-native, reanimated, worklets
- Language: TypeScript
- Homepage:
- Size: 388 KB
- Stars: 86
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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
```sh
yarn add react-native-turbo-haptics
cd ios && pod install
```## Usage
```ts
import { triggerHaptics } from 'react-native-turbo-haptics';// In any JavaScript context:
triggerHaptics('selection');// In worklets:
Gesture.Tap()
.onBegin(() => triggerHaptics('soft'));
``````ts
// 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