Function: scrollTo() ​

Source: 1.1.0 · e3417e89b638

ts
function scrollTo(
   el, 
   hash, 
   options?
): void;

Defined in: packages/valaxy/client/utils/router.ts:32

For theme developers, you can use this function to scroll to the target element. For example, when you click the anchor link in the markdown file, it will scroll to the target element.

Parameters ​

el ​

HTMLElement

hash ​

string

options? ​

Partial<ScrollToOptions> = ...

Returns ​

void