Scroll Animation
BezierFunction
Section titled “BezierFunction”BezierFunction = (
x) =>number
A function that describes the easing curve for the scroll animation. See easings.net for examples of easing functions.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
x | number |
Returns
Section titled “Returns”number
ScrollBehavior
Section titled “ScrollBehavior”ScrollBehavior =
"smooth"|"auto"|"instant"| (currentTop,targetTop) =>object
The scroll behavior to use when scrolling to a location. You can also pass a custom scroll behavior function that returns an object with the number of animation frames and the easing function based on the current scroll top and the targetTop.