Scrollama is a component of Vue to easily set up swipe (aka swipe or scrollytelling) driven interactions. Scrollama is used under the hood. Scrollama uses IntersectionObserver and you’ll want to manually add a polyfill intersection observer for cross-browser support.
how to animate when scrolling, jquery scroll effects, how to use animate css on page scroll, css animations on scroll slide in from bottom, delayed scroll effect, transform on scroll
How to make use of it:
Install & Download:
# NPM $ npm install vue-scrollama intersection-observer --save
Basic Usage
<template> <Scrollama @step-enter="stepEnterHandler"> <div class="step-1" data-step="a">...</div> // classes like .step-1 may be used to adjust the style and dimensions of a step <div class="step-2" data-step="b">...</div> // data-* attributes can be helpful to store instructions to be used in handlers <div class="step-3" data-step="c">...</div> </Scrollama> </template>
<script> import 'intersection-observer' // for cross-browser support import Scrollama from 'vue-scrollama' // local registration in this example, can also be globally registered export default { components: { Scrollama // local registration in this example, can also be globally registered }, methods: { stepEnterHandler ({element, index, direction}) { // handle the step-event as required here console.log({ element, index, direction }); // use the data attributes if needed console.log(element.dataset.step) // a, b or c } } } </script>
The Scrollama component will simply be passed to setup method:
// example with offset prop set to 0.8 <template> <Scrollama @step-enter="stepHandler" :offset="0.8"> ... </Scrollama> </template>
Scroll-driven Interactions, Vue Scrollama Plugin/Github, javascript text animation on scroll, appear on scroll javascript
See Demo And Download
Official Website(vgshenoy): Click Here
This superior jQuery/javascript plugin is developed by vgshenoy. For extra Advanced Usages, please go to the official website.