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

github.com/apertureless/vue-parallax

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/apertureless/vue-parallax

  • v1.1.1
  • Source
  • Go
  • Socket score

Version published
Created
Source

vue-parallaxy

npm version vue2 license

Is a compontent for fast 60fps parallax scroll effects in vue 2.

Demo

Demo here

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>

Props

PropTypeDefault ValueDescription
parallaxBooleantrueActivates parallax effect
speedFactorNumber0.15factor on how strong the effect is
fixedBooleanfalseOther parallax effect. Image is fixed in position
sectionHeightNumber70section height for mobile
breakpointString'(min-width: 968px)'Media query for mobile deactivation
sectionClassString'Masthead'CSS class of the outer section tag
containerClassString'Masthead__image'CSS class of the container holding the image
parallaxClassString'is-parallax'Modifier class for the parallax effect
fixedClassString'is-fixed'Modifier class for the fixed parallax effect

Customizing

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.

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# run unit tests
npm run unit

# run all tests
npm test

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)
  5. Create a new Pull Request

License

This software is distributed under MIT license.

FAQs

Package last updated on 02 Feb 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