React Parallax component using Rellax.js
Switch branches/tags
Nothing to show
Clone or download
Latest commit 78c854b May 2, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Rebuild docs May 2, 2018
src Revise demo copy order May 2, 2018
.babelrc Initial commit Apr 27, 2018
.gitignore Initial commit Apr 27, 2018
.npmignore Initial commit Apr 27, 2018
LICENSE Initial commit Apr 27, 2018
README.md Update demo link May 3, 2018
package-lock.json 1.0.2 May 3, 2018
package.json 1.0.2 May 3, 2018
webpack.config.js Port rellax demo Apr 27, 2018

README.md

react-rellax

Live Demo

React Parallax component using Rellax.js.

Installation

npm i --save react-rellax

Notes

  • All props are optional.
  • It's common to tweak speed and percentage to suit your design requirements.
  • All other props not mentioned below (e.g. className, style, etc.) are passed down as usual.

Props

  • as (str) : Tag to use as a wrapper. Default: div
  • centered (bool) : Centers the component on the viewport
  • horizontal (bool) : Horizontal scrolling
  • onMove (func) : Callback function which accepts an object {x: int, y: int}
  • percentage (num) : Initial scroll percentage
  • speed (int) : Integer >= -10 && <=10 determines scroll speed. Default: -2
  • zIndex (int) : Orders component on the z-axis