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
2929yarn add react-scroll-parallax
3030```
3131
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+
3257## Getting Started
3358
3459Read 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
3636yarn add react-scroll-parallax
3737```
3838
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+
3964## Getting Started
4065
4166- [ Usage] ( /docs/usage/ )
You can’t perform that action at this time.
0 commit comments