react-smart-parallax
v5.0.0
Published
A smart parallax which will calculate the speed based on the overflow of the image
Downloads
2
Readme
react-smart-parallax
A smart parallax which will measure the overflow and calculate the correct scroll speed for the image.
Installation
yarn add react-smart-parallax
Install peer dependencies:
yarn add react react-dom prop-types react-jss
Usage
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>
);
}
Props
img (required)
The url to the image.
children
The content to render in front of the image.
className
An additional className to be applied to the root element.
License
MIT