vue-inview
Inview implementation for Vue 2 based on in-view.
Use this library to register events when elements come into or leave the view port.
Prior Art
This is largely based on in-view but uses no depeendencies
and allows for a more flexible API, i.e. you can pass DOM nodes as input of vue-inview
instead
of only being allowed to pass a selector string.
API
<!-- or -->
In your view instance or everywhere from the root node, you can now listen for the enter and leave event and accompanied data.
Vue // eslint-disable-line no-new { this this } el: '#app'
Please find a detailed example in the example/
directory.
Build Setup
# install dependenciesnpm install# serve with hot reload at localhost:8080npm run dev# build for production with minificationnpm run build# lint all *.js and *.vue filesnpm run lint# run unit testsnpm test
For more information see the docs for vueify.
Licence
MIT