Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kcmr/good-vibrations
Web Component that uses the Vibration API in browsers that support it
https://github.com/kcmr/good-vibrations
mobile polymer polymer-2x vibration-api web-components
Last synced: 13 days ago
JSON representation
Web Component that uses the Vibration API in browsers that support it
- Host: GitHub
- URL: https://github.com/kcmr/good-vibrations
- Owner: kcmr
- License: mit
- Created: 2017-11-05T20:23:51.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-18T11:21:45.000Z (almost 7 years ago)
- Last Synced: 2024-10-15T09:02:52.754Z (29 days ago)
- Topics: mobile, polymer, polymer-2x, vibration-api, web-components
- Language: HTML
- Homepage: http://kcmr.github.io/good-vibrations/
- Size: 1.74 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# <good-vibrations>
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg?style=flat-square)](https://www.webcomponents.org/element/kcmr/good-vibrations)
> `` is a component meant to be used as a singleton, that uses the [Vibration API](https://developer.mozilla.org/docs/Web/API/Vibration_API) to emit vibrations in browsers that support it.
__[<good-vibrations> demo](http://kcmr.github.io/good-vibrations/)__## Installation and import
Install the component using [Bower](http://bower.io/):
```bash
$ bower i -S good-vibrations
```Import Web Components loader (optional) and the component:
```html
```## Usage
__Example:__
```html```
__Example with vibration / silence intervals:__
```html```
__Canceling any running vibration:__
```js
document.querySelector('good-vibrations').cancel();
```Or declaratively using the boolean attribute `mute`:
```html```
__Get Vibration API support:__
```html
Vibration API not supported
```
## Development
browserSync and eslint support.
`eslint` and `eslint --fix` are enabled by default. Edit tasks/config.json to change the default configuration.1. Install npm dependencies: `npm install`
2. Launch the component's demo: `npm run serve`