Skip to content

Commit 48f1a42

Browse files
committed
docs: rootMargin can be used to change progress
1 parent 666830e commit 48f1a42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ All effects are applied based on the original element's progress. Progress begin
3636
By design and by default, all elements progress relative to the view. However, there are optional ways to change how progress is calculated:
3737

3838
1. Manually setting [`startScroll` and `endScroll`](https://parallax-controller.v1.damnthat.tv/docs/usage/props#configuration-props) props allows complete control over when the progress starts and ends.
39-
2. You can also set [`shouldAlwaysCompleteAnimation`](https://parallax-controller.v1.damnthat.tv/docs/usage/props#configuration-props) to true and if the element is positioned inside the view when scroll is at zero or ends in view at final scroll position, the initial and final positions are used to determine progress instead of the scroll view size.
39+
2. Setting a [`rootMargin`](https://parallax-controller.v1.damnthat.tv/docs/usage/props#configuration-props) will add a invisible margin around the element that can be used to change when the element is in view and its progress.
40+
3. You can also set [`shouldAlwaysCompleteAnimation`](https://parallax-controller.v1.damnthat.tv/docs/usage/props#configuration-props) to true and if the element is positioned inside the view when scroll is at zero or ends in view at final scroll position, the initial and final positions are used to determine progress instead of the scroll view size.
4041

4142
:::
4243

0 commit comments

Comments
 (0)