Skip to content

Commit 6b309fa

Browse files
committed
update props docs
1 parent ed750af commit 6b309fa

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

docs/parallax-component.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ const TranslateY = () => (
4141

4242
## Props
4343

44-
All props for creating effects are defined by a _start_ and _end_ value represented by an `array` -- for example: `[start, end]`.
45-
46-
- The _start_ of an effect begins when the element's original position enters the viewport -- the top of the element enters the bottom of the view.
47-
- The _end_ of an effect begins when the element's original position exits the viewport -- the bottom of the element exits the top of the view.
48-
4944
The following are all props that can be passed to the `<Parallax>` component:
5045

5146
### Props: Configuration
@@ -63,6 +58,20 @@ The following are all props that can be passed to the `<Parallax>` component:
6358

6459
### Props: CSS Effects
6560

61+
All props for creating CSS effects are defined by a **_start_** and **_end_** value represented by an `array`
62+
63+
```jsx
64+
<Parallax scale={[start, end]}`/>
65+
```
66+
67+
The **_start_** of an effect begins when the element's original position enters the viewport.
68+
69+
- The top of the element enters the bottom of the view.
70+
71+
The **_end_** of an effect begins when the element's original position exits the viewport.
72+
73+
- the bottom of the element exits the top of the view.
74+
6675
| Name | Type | Description |
6776
| -------------- | :----------------------: | ------------------------------------------------------------------------------------------------------------------------------------- |
6877
| **translateX** | `string[]` or `number[]` | Start and end translation on x-axis in `%` or `px`. If no unit is passed percent is assumed. Percent is based on the elements width. |

0 commit comments

Comments
 (0)