Skip to content

Commit 3b1469f

Browse files
committed
docs: info about speed prop
1 parent 4a13438 commit 3b1469f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

documentation/docs/examples/how-it-works.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ As the element scrolls past the viewport a css translate effect is applied based
1717

1818
<HowItWorks />
1919

20+
:::info
21+
22+
Note that `speed` is only an abstraction for setting `translateY` or `translateX` based on the scroll axis. Each increment of **speed** by one will increase the translate effect by `10px`.
23+
24+
Example: With a vertical scroll axis, `speed: 10` is equivalent to `translateY: ['10px', '-10px']` and `speed: -10` is equivalent to `translateY: ['-10px', '10px']`.
25+
26+
:::
27+
2028
## Progress is relative to the view
2129

2230
All effects are applied based on the original element's progress. Progress begins as the elements top edge enters the bottom of the view. It ends as the bottom of the element leaves the top of the view.

0 commit comments

Comments
 (0)