Device.triggerHaptic
Functional API
generateHapticFeedbackYou can use the same function with this as well.
Feature description
Triggers haptic vibration on the device. You can use it to provide feedback for button taps or screen transitions. typeThis is required.
Type
Device.triggerHaptic(options: HapticFeedbackOptions): Promise<void>;Params
type HapticFeedbackType =
| "tickWeak"
| "tap"
| "tickMedium"
| "softMedium"
| "basicWeak"
| "basicMedium"
| "success"
| "error"
| "wiggle"
| "confetti";
type HapticFeedbackOptions = {
type: HapticFeedbackType;
};Response
None.
Example code
Was this helpful?