Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-parallax-js

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-parallax-js

Tiny vue component that adds a directive for parallax effect on elements.

  • 0.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
450
decreased by-36.71%
Maintainers
1
Weekly downloads
 
Created
Source

vue-parallax-js

Tiny vue component that adds a directive for parallax effect on elements.

  • no dependencies
  • lightweight
  • 1.3k gzip

Setup

npm install --save vue-parallax-js
# or use yarn
yarn add vue-parallax-js

in your main JavaScript file

// import Vue and vue-parallax-js
import Vue from 'vue'
import VueParallaxJs from 'vue-parallax-js'

// add vue-parallax-js to vue
Vue.use(VueParallaxJs)

Usage

when everything is setup you can use the directive like this:

<h1 v-parallax="0.2">vue-parallax-js</h1>

Options

Vue.use(VueParallaxJs, options)
const options = {
  minWidth: Number,   /* minumum window width for parallax to take effect */
  className: String,  /* this class gets added to all elements
                      that are being animated, by default none */
  container: String,  /* element that actually scrolls, by default it's window */
}

Modifiers

when using the v-parallax directive you can also pass some modifiers to configure the instance of vue-parallax-js

<h1 v-parallax.modifier="0.2">vue-parallax-js</h1>
ModifierDescription
centerXwill add transform: translateX(-50%) along with the parallax positioning
absYuses the window height instead of the element height for the calculations

Keywords

FAQs

Package last updated on 16 Nov 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc