vue-bottom-scroll-listener
v0.1.4
Published
A simple Vue component that lets you listen for when you have scrolled to the bottom.
Downloads
10
Maintainers
Readme
vue-bottom-scroll-listener
A simple Vue component that lets you listen for when you have scrolled to the bottom.
Heavily inspired of react-bottom-scroll-listener
Installation
npm:
npm install vue-bottom-scroll-listener
yarn:
yarn add vue-bottom-scroll-listener
Usage
Simple
<bottom-scroll @on-bottom="onBottomCallback"/>
Options
<bottom-scroll @on-bottom="onBottomCallback" :debounce="200" :offset="0">
<p>optional inner content</p>
</bottom-scroll>
Props
@on-bottom
(required): callback invoked when bottom is reached:debounce
: (default: 200) integer in ms, how much debounce there should be on callback:offset
: (default: 0) offset from bottom in pixels. E.g. 300 if it should invokeonBottom
300px before the bottom.
Demo
https://eregnier.github.io/vue-bottom-scroll-listener/dist/js/