A simple scroll trigger (gsap based) for vue.js
npm install vue-simple-scroll-triggerVue.js plugin for GSAP Scroll Trigger
We are talking about a Vue component and directive that make Scroll Trigger easy to use without leaving the template section.
```
npm install vue-simple-scroll-trigger
`js
import App from './App.vue';
import VSimpleScrollTrigger from 'vue-simple-scroll-trigger';
import Vue from 'vue';
Vue.use(VSimpleScrollTrigger);
new Vue({
render: h => h(App),
}).$mount('#app');
`
or without plugin initialization...
`vue
`
or using the directive
(note: if you dont install the plugin you ll need to import the directive and bind it to your component)
`vue
`
- ### start
- type: String, top 90%
- default: String
- ### end
- type: , top 20%
- default: String
- ### toggleClass
- type: , null
- default: Function
- ### onEnter for both originals 'onEnter' 'onEnterBack' callbacks
- type: , null
- default: Function
- ### onLeave for both originals 'onLeave' 'onLeaveBack' callbacks
- type: , null`
- default:
- ### scroller
- default: document.body
MIT @ Davide Turrini (davide-turrini)
(Please note: This is my second try to publish something on npm! Any kind of feedback or contribution is more than welcome)