Vibration API
The Vibration API provides a way to control the vibration mechanism of the hosting device.
Browser Support
The Vibration API is supported in most modern browsers. Check the browser compatibility before implementing.
Interactive Demo
Try out different vibration patterns and durations
Not Supported
ms
ms
ms
ms
ms
API Documentation
Reference guide for the Vibration API
Methods
navigator.vibrate(duration)
- Vibrate for specified millisecondsnavigator.vibrate(pattern)
- Vibrate following a pattern array
Parameters
duration
- Number of milliseconds to vibratepattern
- Array of numbers representing vibration and pause intervals