• Stars
    star
    637
  • Rank 70,628 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 8 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐ŸŒŒ Vue.js component for parallax image scroll effects

vue-parallaxy

npm version vue2 license

ko-fi

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

Prop Type Default Value Description
parallax Boolean true Activates parallax effect
speedFactor Number 0.15 factor on how strong the effect is
direction String 'up' Either 'up' or 'down', determines scroll direction of image
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

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.

More Repositories

1

vue-chartjs

๐Ÿ“Š Vue.js wrapper for Chart.js
TypeScript
5,542
star
2

vue-password-strength-meter

๐Ÿ” Password strength meter based on zxcvbn in vue.js
JavaScript
560
star
3

vue-cookie-law

๐Ÿช ๐Ÿ‘ฎ Hackable EU Cookie Law Plugin for Vue.js
JavaScript
376
star
4

vue-breakpoints

๐Ÿฌ ๐Ÿ™ˆ Vue.js utility component to show and hide components based on breakpoints
JavaScript
194
star
5

npm-stats

๐Ÿ“ˆ npm package statistics dashboard build with vue
Vue
113
star
6

shopware-api-client

๐Ÿ› Javascript API Client for Shopware
JavaScript
32
star
7

vue-observable

IntersectionObserver, MutationObserver and PerformanceObserver in Vue.js
JavaScript
24
star
8

wipfred

๐ŸšงManage your wip.chat todos with alfred
JavaScript
21
star
9

sketch-flip-size

๐Ÿ” FlipSize is a small Sketch plugin to flip the size of a shape, layer or artboard
JavaScript
17
star
10

vscode-icon

๐ŸŒ€ Round OSX icon for VSCode ๐Ÿš€
16
star
11

vue-chartjs-demo

๐Ÿ“Š ๐Ÿ“ˆ Github Pages with demo charts for vue-chartjs
JavaScript
16
star
12

alfred-git-snippets

Alfred Powerpack snippets for git commit messages that are awesome
11
star
13

colourhunt

๐ŸŽจCommunity driven colour palettes
Vue
10
star
14

wiviz

Wifi client probe analyzer & visualizer
JavaScript
10
star
15

vue-chartjs-vuex

Sample project for vue-chartjs with vuex
JavaScript
9
star
16

bs3stat

๐Ÿ“Š Small dashboard service for backup ๐Ÿ’พ
Vue
7
star
17

alibaba-discount-alert

๐Ÿšจ Alert service for aliexpress discounts
JavaScript
5
star
18

mina-hipchat

HipChat room notifications for mina deploy
Ruby
3
star
19

presentation-vuex-testing

๐Ÿ’ ๐Ÿ’ฌ Slides of my vuex testing talk
3
star
20

flipper-de

FlipperZero Database for german signals
3
star
21

hacker-zines

Zines, Newsletters and Stuff that may be older than you!
2
star
22

deepbook

A social network prototype build with laravel
PHP
1
star
23

vuex-notes-app

๐Ÿ““ Vue.js note app with vuex for testing purposes
JavaScript
1
star
24

vue-chartjs-quasar

JavaScript
1
star