MCPcopy Index your code
hub / github.com/apertureless/vue-parallax

github.com/apertureless/vue-parallax @v1.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.1 ↗ · + Follow
285 symbols 778 edges 13 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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="https://github.com/apertureless/vue-parallax/raw/v1.1.1/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
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.

Core symbols most depended-on inside this repo

ht
called by 51
docs/static/js/vendor.533130804e527ac1039f.js
t
called by 35
docs/static/js/vendor.533130804e527ac1039f.js
i
called by 34
docs/static/js/vendor.533130804e527ac1039f.js
f
called by 25
docs/static/js/vendor.533130804e527ac1039f.js
a
called by 19
docs/static/js/vendor.533130804e527ac1039f.js
d
called by 18
docs/static/js/vendor.533130804e527ac1039f.js
o
called by 16
docs/static/js/vendor.533130804e527ac1039f.js
n
called by 14
docs/static/js/vendor.533130804e527ac1039f.js

Shape

Function 285

Languages

TypeScript100%

Modules by API surface

docs/static/js/vendor.533130804e527ac1039f.js283 symbols
docs/static/js/manifest.a869ddbfbe64902b9233.js1 symbols
docs/static/js/app.4eed5bdb25ebe223978a.js1 symbols

For agents

$ claude mcp add vue-parallax \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page