Skip to content

Commit 7462fae

Browse files
committed
update readme, publish
1 parent a8160a1 commit 7462fae

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,42 @@
11
# vue-visibility-trigger
2+
3+
Vue component that helps you run a function when the node comes into view.
4+
5+
## Installation
6+
7+
Install the package from npm by running
8+
9+
```
10+
$ yarn add 'vue-visibility-trigger'
11+
```
12+
13+
or
14+
15+
```
16+
$ npm install --save 'vue-visibility-trigger'
17+
```
18+
19+
## Usage
20+
21+
Import, register and place the component in your Vue app. Attach a function to react to the 'scrollIn' event with 'v-on:scrollIn="..."' or '@scrollIn="..."'.
22+
23+
```
24+
<template>
25+
...
26+
<vue-visibility-trigger @scrollIn="doSomething" />
27+
...
28+
</template>
29+
30+
<script>
31+
import VueVisibilityTrigger from 'vue-visibility-trigger'
32+
33+
export default {
34+
...
35+
components: {
36+
"vue-visibility-trigger": VueVisibilityTrigger
37+
}
38+
};
39+
</script>
40+
```
41+
42+
[![vue-visibility-trigger demo](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/qkyolorn6w?module=%2Fsrc%2FApp.vue)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-visibility-trigger",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Vue component that helps you run a function when the node comes into view",
55
"license": "MIT",
66
"main": "dist/vue-visibility-trigger.umd.js",

0 commit comments

Comments
 (0)