File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,31 @@ or yarn
29
29
yarn add react-scroll-parallax
30
30
```
31
31
32
+ ## Example
33
+
34
+ [ Create effects] ( https://react-scroll-parallax.damnthat.tv/docs/examples/how-it-works ) with a hook:
35
+
36
+ ``` jsx
37
+ function Component () {
38
+ const parallax = useParallax ({
39
+ speed: - 10 ,
40
+ });
41
+ return < div ref= {parallax .ref } / > ;
42
+ }
43
+ ```
44
+
45
+ or with a component:
46
+
47
+ ``` jsx
48
+ function Component () {
49
+ return (
50
+ < Parallax speed= {- 10 }>
51
+ < div / >
52
+ < / Parallax>
53
+ );
54
+ }
55
+ ```
56
+
32
57
## Getting Started
33
58
34
59
Read the [ documentation] ( https://react-scroll-parallax.damnthat.tv/ ) for setup and usage instructions.
Original file line number Diff line number Diff line change @@ -36,6 +36,31 @@ or yarn
36
36
yarn add react-scroll-parallax
37
37
```
38
38
39
+ ## Example
40
+
41
+ [ Create effects] ( /docs/examples/how-it-works ) with a hook:
42
+
43
+ ``` jsx
44
+ function Component () {
45
+ const parallax = useParallax ({
46
+ speed: - 10 ,
47
+ });
48
+ return < div ref= {parallax .ref } / > ;
49
+ }
50
+ ```
51
+
52
+ or with a component:
53
+
54
+ ``` jsx
55
+ function Component () {
56
+ return (
57
+ < Parallax speed= {- 10 }>
58
+ < div / >
59
+ < / Parallax>
60
+ );
61
+ }
62
+ ```
63
+
39
64
## Getting Started
40
65
41
66
- [ Usage] ( /docs/usage/ )
You can’t perform that action at this time.
0 commit comments