JavaScript Vibration API


Modern mobile devices include hardware for vibrations. The Vibration API offers Web apps the ability to access this hardware, if it exists, and does nothing if the device doesn't support it.


  • let success = window.navigator.vibrate( pattern );


Support by browsers might be limited. Also support by the operating system may be limited.

The following table gives an overview of the earliest browser versions that provide support for vibrations.

ChromeEdgeFirefoxInternet ExplorerOperaOpera MiniSafari
30no support16no support17no supportno support