Skip to main content
Version: v2

scrollTo

Start from API_LEVEL 2.0 . Please refer to API_LEVEL.

Scroll the page to the specified position.

Type

function scrollTo(option: Option): void

Simplified calling method

function scrollTo(y: number): void

Parameters

Option

PropertyTypeRequiredDefaultValueDescriptionAPI_LEVEL
ynumberY-Vertical axis coordinates of the page2.0

Example

import { scrollTo } from '@zos/page'

scrollTo({
y: 200,
})