Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
vue-rellax
Advanced tools
Readme
A plugin of Vue that adds a directive for parallax effect by Rellax.js.
npm i vue-rellax -S
or
yarn add vue-rellax
Since this plugin uses WeakMap, old browsers need to load pollyfill.
<script crossorigin="anonymous" src="https://polyfill.io/v3/polyfill.min.js?features=WeakMap"></script>
import Vue from 'vue'
import VueRellax from 'vue-rellax'
Vue.use(VueRellax)
const vm = new Vue({
el: '#app',
template: `
<div v-rellax="{
// Rellax Options
// See: https://github.com/dixonandmoe/rellax#features
speed: -2,
}">
I’m slow and smooth
</div>
`
})
To destroy
, assign false
to v-relax
.
const vm = new Vue({
el: '#app',
template: `
<div>
<p v-rellax="rellax">
I’m slow and smooth
</p>
<button type="button" @click="destroyRellax">Destroy Rellax</button>
</div>
`,
data() {
return {
rellax: {
speed: -2
}
}
},
methods: {
destroyRellax() {
this.rellax = false
}
}
})
In your nuxt.config.js
{
plugins: [
{ src: '~~/node_modules/vue-rellax/lib/nuxt-plugin', ssr: false }
]
}
FAQs
A plugin of Vue that adds a directive for parallax effect by rellax.js.
The npm package vue-rellax receives a total of 217 weekly downloads. As such, vue-rellax popularity was classified as not popular.
We found that vue-rellax demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.