DEV Community

Cover image for Mobile Vibration Designer! πŸ“³
Ben Duncan
Ben Duncan

Posted on

Mobile Vibration Designer! πŸ“³

I recently read a great post introducing the vibration API that inspired me to play with using vibrations on mobile.

It was a simple enough API, but I found it difficult to make vibrations that followed a pattern I wanted.

In response, I created a vibration designer where you can tap out a pattern on and test out and copy the vibration code that recreates the pattern.

Check the https://glitch.com/~vibration-designer, where you can see the source code and play with it. I made use of some neat vanilla Javascript features like Proxy, navigator.vibrate, and manipulation of CSS custom properties (variables).

Note: This is best used on Android mobile if you want to play the vibration.
For more details check out Can I Use: Vibration

Top comments (0)