You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,25 +70,25 @@ function App() {
70
70
}
71
71
```
72
72
73
-
Then import the `Parallax` component and use it anywhere within the provider. Here's an example that will transform the element on the `y` axis starting at `-20%` and ending at `20%` (`y = [-20, 20]`\*percent is assumed with no provided unit).
73
+
Then import the `Parallax` component and use it anywhere within the provider. Here's an example that will transform the element on the `translateY` axis starting at `-20%` and ending at `20%` (`translateY = [-20, 20]`\*percent is assumed with no provided unit).
74
74
75
75
```jsx
76
76
import { Parallax } from'react-scroll-parallax';
77
77
78
78
constVerticalParallax= () => (
79
-
<Parallax y={[-20, 20]}>
79
+
<Parallax translateY={[-20, 20]}>
80
80
<div className="my-thing"/>
81
81
</Parallax>
82
82
);
83
83
```
84
84
85
-
Example with transforms on the `x` axis starting at `-100px` and ending at `200px` (`x = ['-100px', '200px']`).
85
+
Example with transforms on the `translateX` axis starting at `-100px` and ending at `200px` (`translateX = ['-100px', '200px']`).
Copy file name to clipboardExpand all lines: docs/parallax-component.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,8 +30,8 @@ const SlowAndFast = () => (
30
30
If you need more fine tune control of the scroll position you can apply start and end transforms more directly. In this example the element begins with a `translateY(-20%)` and ends with `translateY(10%)`
0 commit comments