vue-visibility-trigger

A Vue component that emits an event when scrolled into view
1,141 5
Install
npm install vue-visibility-trigger
Latest Version:0.1.4
Vue:2
License:MIT
Last Updated:Dec 30, 2022
Links: GitHub  ·  npm
Maintainer: shwilliam

vue-visibility-trigger

Vue component that emits an event when scrolled into view

vue-visibility-trigger demo

Installation

Install the package from npm by running

$ yarn add vue-visibility-trigger

or

$ npm i vue-visibility-trigger

Usage

Import, register and place the component in your Vue app. Attach a function to react to the 'scrolledIn' event with 'v-on:scrolledIn="..."' or '@scrolledIn="..."'.

<template>
  ...
    <VueVisibilityTrigger @scrolledIn="doSomething" />
  ...
</template>

<script>
import VueVisibilityTrigger from 'vue-visibility-trigger'

export default {
  ...
  components: {
    VueVisibilityTrigger
  }
};
</script>

Dev

Running dev and example scripts require @vue/cli and @vue/cli-service-global to be installed. Install globally by running npm i --g @vue/cli @vue/cli-service-global or yarn add global vue/cli @vue/cli-service-global

Related Packages

vue-on-intersect

Intersection Observer for Vue JS

6,109 0
easyscroll

this is a tiny scroll bar plugin for vue2.0

871 41
vue-dragscroll

vue directive to make a scrollable element scroll by draging to the scroll direc...

1,541,547 264
vue3-smooth-scroll

Simple vue smooth scroll

209,775 34
vue2-smooth-scroll

Simple vue smooth scroll

127,387 121

Version History

Version Released Vue License
0.1.4 ^2.5.16 MIT
0.1.3 ^2.5.16 MIT
0.1.2 ^2.5.16 MIT
0.1.1 ^2.5.16 MIT
0.1.0 ^2.5.16 MIT