https://github.com/marcoshmendes/shake.js
Let's shake baby! shake.js is cool framework that uses Vibrate API from HTML5 to making smartphones shake-up in different ways. You can use shake.js in your project to make your app more interactive
https://github.com/marcoshmendes/shake.js
html5-vibrate shake shake-up vibrate vibrate-api
Last synced: 28 days ago
JSON representation
Let's shake baby! shake.js is cool framework that uses Vibrate API from HTML5 to making smartphones shake-up in different ways. You can use shake.js in your project to make your app more interactive
- Host: GitHub
- URL: https://github.com/marcoshmendes/shake.js
- Owner: marcoshmendes
- License: mit
- Created: 2016-10-23T17:16:59.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-08T04:41:47.000Z (over 8 years ago)
- Last Synced: 2026-05-06T14:50:41.889Z (3 months ago)
- Topics: html5-vibrate, shake, shake-up, vibrate, vibrate-api
- Language: JavaScript
- Homepage: http://shakejs.marcoshmendes.com/
- Size: 77.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ~~ Shake.JS ~~
Let's shake baby! shake.js is a cool framework that uses Vibrate API from HTML5 to make smartphones shake up in different ways. You can use shake.js in your project to make your app more interactive, like notifications, games and others.
### Installation
```
bower install shakejs --save
```
### Usage
import script to your HTML and you're done!
```html
```
Now, use the object **shake** on your script, it has a unique method named **tremble('param')**, you can manipulate vibration modes through this method.
The function accept one param from its list, you can check it out below
```javascript
//List of possible values
shake.tremble("zigZig");
shake.tremble("continous");
shake.tremble("sms");
shake.tremble("badum");
shake.tremble("alarmClock");
shake.tremble("sos");
shake.tremble("intruders");
shake.tremble("annoying");
shake.tremble("doorBell");
```
### Support
You can check browser support for this functionality on this link: https://caniuse.com/#search=Vibration%20API