Usage
Methods
impactOccurred
Triggers impact feedback, useful for simulating physical impacts.Parameters
type
- Type:
'light' | 'medium' | 'heavy' | 'soft' | 'rigid'
light: A light impactmedium: A medium impactheavy: A heavy impactsoft: A soft, dampened impactrigid: A sharp, rigid impact
Example
notificationOccurred
Triggers notification feedback, ideal for indicating task outcomes.Parameters
type
- Type:
'success' | 'warning' | 'error'
success: Indicates a successful operationwarning: Indicates a warning or cautionerror: Indicates an error or failure
Example
selectionChanged
Triggers selection feedback, perfect for UI element selections.Example
Return Value
All haptic methods returnPromise<void>.
Availability
Haptic feedback availability depends on the client device and platform. You can check if haptics are supported using thegetCapabilities() method:
Best Practices
- Use sparingly: Overuse of haptic feedback can be distracting
- Match intensity to action: Use light feedback for minor actions, heavy for significant ones
- Provide visual feedback too: Not all devices support haptics
- Check availability: Always verify haptic support before using
- Consider context: Some users may have haptics disabled in their device settings

