Test Vibration API
Vibration API: Not Supported
Test on a mobile device or emulator with vibration support
The Vibration API allows web apps to access device vibration hardware. Patterns are defined as arrays: vibrate duration, pause, vibrate, pause... Not available on iOS Safari. Works on Android Chrome and some desktop browsers.
Predefined vibration patterns
Haptic event history
Trigger a pattern to see events
// navigator.vibrate(pattern) // pattern = [vibrate, pause, vibrate, pause, ...] // Single vibration navigator.vibrate(200); // 200ms // Pattern navigator.vibrate([100, 50, 100]); // vibrate 100ms, pause 50ms, vibrate 100ms // Stop vibration navigator.vibrate(0); // or navigator.vibrate([]);
Best practices for haptic feedback
Automation hints