Tracks the scroll position of the window.
An object containing readonly references to the scroll position of the window.
const { x, y } = useWindowScroll() watchEffect(() => { console.log('Window scroll:', { x: x.value, y: y.value }) }) Copy
const { x, y } = useWindowScroll() watchEffect(() => { console.log('Window scroll:', { x: x.value, y: y.value }) })
Tracks the scroll position of the window.