0.1.3 • Published 7 years ago
@lahautesociete/vue-parallax v0.1.3
LHS Vue Parallax
LHS Vue plugin to use lhs-parallax in Vue with a directive.
Installation
npm install @lahautesociete/vue-parallaxUsage
main.js
Import Vue and LhsParallax somewhere in your entry file.
Then tell Vue to use LhsParallax plugin.
import Vue from 'vue';
import LhsVueParallax from '@lahautesociete/vue-parallax'
Vue.use(LhsVueParallax);CustomComponent.vue
In your vue template, add a HTML element with the v-parallax directive and specify a parallax level.
You can add an optional modifier (x / y) to specify the parallax direction.
<div v-parallax.x="5"></div>