vue-bottom-scroll-listener

0.1.4 • Public • Published

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 invoke onBottom 300px before the bottom.

Demo

https://eregnier.github.io/vue-bottom-scroll-listener/dist/js/

Package Sidebar

Install

npm i vue-bottom-scroll-listener

Weekly Downloads

3

Version

0.1.4

License

MIT

Unpacked Size

1.53 MB

Total Files

17

Last publish

Collaborators

  • utopman