A smart parallax which will measure the overflow and calculate the correct scroll speed for the image.
yarn add react-smart-parallax
Install peer dependencies:
yarn add react react-dom prop-types react-jss
import Parallax from 'react-smart-parallax';
import React from 'react';
function Component() {
return (
<Parallax img="https://website.com/image.png">
The content in front of the image. This can be empty aswell.
</Parallax>
);
}
The url to the image.
The content to render in front of the image.
An additional className to be applied to the root element.
MIT