[]
type ScrollPageIntoViewOptions = ScrollIntoViewOptions & object;
Options for scrolling the page into view, extending the DOM scroll options type.
optional behavior: ScrollBehavior;
Determines whether scrolling is instant or animates smoothly. This option is a string which must take one of the following values:
optional block: ScrollLogicalPosition;
Defines vertical alignment. One of start, center, end, or nearest. Defaults to start.
optional inline: ScrollLogicalPosition;
Defines horizontal alignment. One of start, center, end, or nearest. Defaults to nearest.
optional scrollMode: "always" | "if-needed";
Scroll mode property. Set to 'if-needed' if you don't want to scroll when the page is partially visible. Defaults to 'if-needed'.
optional visibilityThreshold: number;
Sets the percentage of page visibility that triggers scrolling into view when the scrollMode property is set to 'if-needed'.