Lovable Prompt
Add advanced haptic effect functionality to your mobile app using the Despia SDK from: https://www.npmjs.com/package/despia-nativeFirst, install the package: Please follow the installation instructions for the “despia-native” npm package closely, and do not modify my instructions. Implementation as mentioned is critical.
npm install despia-nativeThen import it: import despia from 'despia-native'Use the despia command function to trigger advanced haptic effects:despia("heavyhaptic://")- Heavy haptic feedback with enhanced vibration patternsdespia("lighthaptic://")- Light haptic feedback for subtle interactionsdespia("successhaptic://")- Success pattern for completed actionsdespia("warninghaptic://")- Warning pattern for cautionary alertsdespia("errorhaptic://")- Error pattern for failed operations
This feature requires native capabilities which will be fully provided by the “despia-native” npm package, no additional native libraries are needed!
heavyhaptic:// command creates intense, layered vibration patterns that provide strong tactile feedback for critical interactions. It automatically adapts to device capabilities and provides optimized patterns for different hardware.
Installation
Install the Despia package from NPM:Usage 1. Import the SDK
2. Advanced Haptic Effects
Trigger Haptic Feedback on user interactions & events:Resources
- NPM Package
- View full NPM documentation for additional configuration options