Skip to content

Scroll Animation

BezierFunction = (x) => number

A function that describes the easing curve for the scroll animation. See easings.net for examples of easing functions.

ParameterType
xnumber

number


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.