Skip to content

Complete guide to

Mastering Pinia

written by its creator

API Documentation / RouterScrollBehavior

Interface: RouterScrollBehavior

Type of the scrollBehavior option that can be passed to createRouter.

Callable

RouterScrollBehavior

RouterScrollBehavior(to, from, savedPosition): Awaitable<false | void | ScrollPosition>

Parameters

NameTypeDescription
toRouteLocationNormalizedRoute location where we are navigating to
fromRouteLocationNormalizedLoadedRoute location where we are navigating from
savedPositionnull | _ScrollPositionNormalizedsaved position if it exists, null otherwise

Returns

Awaitable<false | void | ScrollPosition>

Released under the MIT License.