react-scroll-parallax
Advanced tools
Comparing version 3.0.1 to 3.0.2
{ | ||
"name": "react-scroll-parallax", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "React hooks and components to create parallax scroll effects for banners, images or any other DOM elements.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -32,2 +32,27 @@ <a href="https://react-scroll-parallax.damnthat.tv/"><img src="https://react-scroll-parallax.damnthat.tv/img/logo.png" style="width:96px;height:auto;"></a> | ||
## Example | ||
[Create effects](https://react-scroll-parallax.damnthat.tv/docs/examples/how-it-works) with a hook: | ||
```jsx | ||
function Component() { | ||
const parallax = useParallax({ | ||
speed: -10, | ||
}); | ||
return <div ref={parallax.ref} />; | ||
} | ||
``` | ||
or with a component: | ||
```jsx | ||
function Component() { | ||
return ( | ||
<Parallax speed={-10}> | ||
<div /> | ||
</Parallax> | ||
); | ||
} | ||
``` | ||
## Getting Started | ||
@@ -34,0 +59,0 @@ |
188380
80