An open API service indexing awesome lists of open source software.

https://github.com/ctf0/vue-proximity-feedback

https://github.com/codrops/ProximityFeedback/ "not exactly"
https://github.com/ctf0/vue-proximity-feedback

Last synced: over 1 year ago
JSON representation

https://github.com/codrops/ProximityFeedback/ "not exactly"

Awesome Lists containing this project

README

          


Vue Proximity Feedback


npm npm

## Installation

```bash
npm install vue-proximity-feedback --save
```


## Usage

- register the component.

```js
window.Vue = require('vue')

Vue.component(ProximityFeedback, require('vue-proximity-feedback').default)
```

- create a css animation
```css
@keyframes pulse {
to {
transform: scale(1.4);
}
}

.pulse {
animation: pulse 0.25s ease infinite alternate;
}
```

- usage
```html



```

- you can conditionaly start / stop the mouse tracking through
```vue
this.$refs.pfb.stop()
this.$refs.pfb.start()
```

| prop | required | type | default | description |
|----------------|--------------------|--------|--------------------|----------------------------------------|
| tag | :x: | string | span | |
| animationClass | :white_check_mark: | string | | |
| distance | :x: | object | {min: 0, max: 100} | |
| divideBy | :x: | number | 100 | proximity / divideBy = animation speed |


## TODO
- fix frame stutter when animation speed change.