Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

kota-react-rellax

nathobson37MIT1.0.0

Fork of React Parallax component using Rellax.js

react, rellax, parallax, kota

readme

react-rellax

React Parallax component using Rellax.js. Fork of React Rellax

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
  • center (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
  • wrapper (str) : Selector to use as a wrapper from which to calculate parallax position.