There is a Vibration API. It is pretty easy to use!
You can use it on every device that has a vibration motor in them. Like your phone!
You can even programme pattern. So you just don’t have one long vibration.
pattern : pattern is numeric value or numeric Array. pattern of vibration and pause intervals. you can pass single value to vibrate for that many milliseconds.
window.navigator.vibrate(100) // vibrate for 100 milliseconds window.navigator.vibrate() // the same thing as above window.navigator.vibrate([100,50,100,200]) // vibrate on given patter window.navigator.vibrate(0) // you can cancel the vibration by passing 0