Vue.js component for parallax image scroll effects
vue-parallax is a compontent for fast 60fps parallax scroll effects in vue 2.
Demo
https://apertureless.github.io/vue-parallax/
Install
npm install vue-parallaxy or yarn add vue-parallaxy
Usage
vue-parallax works with slots. So you can pass an image or even srcsets for better mobile experiences.
// Image.vue
<template>
<parallax>
<img src="path/cool-background-image.jpg" alt="very cool bg">
</parallax>
</template>
<script>
import Parallax from 'vue-parallaxy'
export default {
components: {
Parallax
}
}
</script>
Source Code
This post is submitted by our members. Submit a new post.
Topics: Javascript VueJS VueJS 2
Tags: Tutorials