Function: useScrollTo()
useScrollTo(
x?,y?,behavior?):void
Defined in: src/infrastructure/viewport/viewport.service.ts:160
Scrolls the window to a specific position, respecting prefers-reduced-motion.
Parameters
x?
number = 0
Horizontal scroll target (default: 0).
y?
number = 0
Vertical scroll target (default: 0).
behavior?
ScrollBehavior = "smooth"
Scroll behavior (default: "smooth").
Returns
void
Example
useScrollTo(0, 500); // scroll to 500px from top