When to use this skill
ALWAYS use this skill when the user mentions:
- Tactile or haptic feedback on mobile devices
- Vibration patterns or feedback types
- Fallback for devices without haptic support
Trigger phrases include:
- "haptics", "vibration", "tactile feedback", "haptic feedback", "vibrate"
How to use this skill
- Install the haptics plugin:
cargo add tauri-plugin-haptics - Register the plugin in your Tauri builder:
tauri::Builder::default() .plugin(tauri_plugin_haptics::init()) - Configure capabilities in
src-tauri/capabilities/default.json:{ "permissions": ["haptics:allow-vibrate", "haptics:allow-impact-feedback", "haptics:allow-notification-feedback"] } - Trigger haptic feedback from the frontend:
import { impactFeedback, notificationFeedback, ImpactFeedbackStyle } from '@tauri-apps/plugin-haptics'; await impactFeedback(ImpactFeedbackStyle.Medium); await notificationFeedback('success'); - Use appropriate feedback types: impact for touch interactions, notification for success/error/warning
- Handle unsupported devices with try/catch and silent fallback (no error shown to user)
Outputs
- Haptic feedback integration with appropriate feedback types
- Pattern selection guidance (impact vs notification)
- Silent fallback for unsupported devices
References
- https://v2.tauri.app/plugin/haptics/
Keywords
tauri haptics, vibration, tactile feedback, mobile, haptic patterns