Skip to content

Releases: jscottsmith/react-scroll-parallax

v2.3.3

04 Jun 05:02
Compare
Choose a tag to compare

Changes

v2.3.0

12 Jan 21:38
Compare
Choose a tag to compare

Changes

  • Allow custom props to be added to <ParallaxBanner> layers #81

v2.0.0

01 Oct 05:13
Compare
Choose a tag to compare

Changes

v2.1.0

07 Apr 00:16
Compare
Choose a tag to compare

Changes

  • Updates the controller scroll container in the ParallaxProvider when the element updates. See #56

v2.0.6

04 Apr 06:17
Compare
Choose a tag to compare

Changes

v2.0.0

07 Mar 07:49
Compare
Choose a tag to compare

Breaking changes

  • Replaces all the offset props and removes the slowerScrollRate prop in favor of x/y props that take arrays for start/end values
  • Updated the way progress is calculated
  • Support for the latest React version

New Features

  • Added support for horizontal scrolling
  • Support parallax scrolling effects in a div with scroll overflow

Breaking changes

Replaces all the offset props and removes the slowerScrollRate prop in favor of x/y props that take arrays for start/end values

This:

<Parallax offsetYMin={-100}  offsetYMax={100} slowerScrollRate={false}>

becomes this (values flipped):

<Parallax y={[100, -100]}>

And this:

<Parallax offsetYMin={-100}  offsetYMax={100} slowerScrollRate={true}>

becomes this (starts at -100%, ends at 100%):

<Parallax y={[-100, 100]}>

Why?

The way the min/max offsets worked was confusing and limiting:

Updated the way progress is calculated

Progress is now calculated from the original elements position in the viewport. So the top of the element at the bottom of the window is 0, the bottom of the element at the top of the window is 1. If you are upgrading from v1 some elements may appear to move further/faster than they did before so you might need to adjust the x/y offsets.

These changes address this issue:

#24

Which now allows for this:

http://react-scroll-parallax-next.surge.sh/?selectedKind=%3CParallax%3E%20Vertical&selectedStory=linear%20y%20offsets&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybooks%2Fstorybook-addon-knobs

Support for the latest React version

Removes usage of some deprecated lifestyle hooks and uses the latest context api. Requires [email protected] or greater.

New Features

Added support for horizontal scrolling

Horizontal scrolling is now working. Just tell the provider the axis:

<ParallaxProvider scrollAxis="horizontal" />

Example:

http://react-scroll-parallax-next.surge.sh/?selectedKind=%3CParallax%3E%20Horizontal&selectedStory=linear%20x%20offsets&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybooks%2Fstorybook-addon-knobs

Support parallax scrolling effects in a div with scroll overflow

Give the provider a reference to the DOM element which will be scrollable and contain parallax elements.

const domElement = document.getElementById('my-scrolling-div');

<ParallaxProvider scrollContainer={domElement} />;

Example:

http://react-scroll-parallax-next.surge.sh/?selectedKind=%3CParallax%3E%20in%20a%20%3Cdiv%3E&selectedStory=vertical%20with%20y%20offsets&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybooks%2Fstorybook-addon-knobs

v1.3.5

31 May 05:03
Compare
Choose a tag to compare

Changes

  • #31 Add troubleshooting section to clarify positioning limitations

v1.3.4

25 May 06:54
Compare
Choose a tag to compare

Changes

  • #30 Add MIT license
  • #28 Update readme with link to examples source code @stefl

v1.3.3

16 Mar 19:57
Compare
Choose a tag to compare

Changes

v1.3.2

05 Mar 02:45
Compare
Choose a tag to compare

Changes

  • Add support for custom children as layer content for ParallaxBanner #22