Skip to content

Commit c47bca8

Browse files
committed
update README
1 parent 85d9882 commit c47bca8

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ const HorizontalParallax = () => (
8585
);
8686
```
8787

88+
## How it works
89+
90+
TODO: **Explain how and when effects are applied** with some illustrations and demos.
91+
8892
**Warnings:**
8993

9094
1. This lib was designed to be used on `relative` or `absolute` positioned elements that scroll naturally with the page. If you use `fixed` positioning on either the element itself or the parent you will encounter issues. More on that in [troubleshooting](#troubleshooting).

docs/parallax-component.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
The main component for manipulating a DOM element's position based on it's position within the viewport.
44

5+
## Example
6+
7+
```jsx
8+
import { Parallax } from 'react-scroll-parallax';
9+
10+
const VerticalParallax = () => (
11+
<Parallax y={[-20, 20]}>
12+
<div className="my-thing" />
13+
</Parallax>
14+
);
15+
```
16+
517
## Parallax Props
618

719
The following are all props that can be passed to the `<Parallax>` component:

0 commit comments

Comments
 (0)