Vue 2 component for parallax scrolling effects
npm install vue-parallaxyIs a compontent for fast 60fps parallax scroll effects in vue 2.
npm install vue-parallaxy or yarn add vue-parallaxy
``javascript
// Image.vue

`
| Prop | Type | Default Value | Description
|----------|:-------------:|------|------|
| parallax | Boolean | true | Activates parallax effect |
| speedFactor | Number | 0.15 | factor on how strong the effect is|
| fixed | Boolean | false | Other parallax effect. Image is fixed in position |
| sectionHeight | Number | 70 | section height for mobile |
| breakpoint | String | '(min-width: 968px)' | Media query for mobile deactivation |
| sectionClass | String | 'Masthead' | CSS class of the outer section tag |
| containerClass | String | 'Masthead__image' | CSS class of the container holding the image |
| parallaxClass | String | 'is-parallax' | Modifier class for the parallax effect |
| fixedClass | String | 'is-fixed' | Modifier class for the fixed parallax effect |
You can change some of the behavior by changing the css classes. To be more clean, you can change them over the props. No need to overwrite or !important the existing classes.
` bashinstall dependencies
npm install
For detailed explanation on how things work, checkout the guide and docs for vue-loader.
Contributing
1. Fork it ( https://github.com/apertureless/vue-parallax/fork )
2. Create your feature branch (
git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature`)This software is distributed under MIT license.