The root element.
A positive value (pixel) to offset the top position of the element. The start offset value should never be negative as technically, offseting to before the element comes into view doesn't have an effect and will only complicate things for you. Changing this value will affect the poitn at which your progress hits 0 (starts).
A value (pixel) to add to the total height of the element. Can be positive or negative values. Think of this, shortening or growing your element virually. Changing this value will affect the point at which your progress hits 1 (ends).
percent The amount in percentage that the user has scrolled in the element.
Given an element, returns the amount that the element has been scrolled through in the the window.
Example: This method is particularly useful when you have a 100vh sticky element and want a relative distance travelled percentage.
Top and bottom offset. You can offset the top and bottom so that the calculations are shifted.
Provided the element is larger than the viewport height, this will return 0% when the element is above the screen, it increases in value as the user scrolls through the element and finally when the BOTTOM of the element just passes the bottom of the screen it returns 1.
This method assumes that the tracked element is atleast more than 100vh.