Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 321 Bytes

index.md

File metadata and controls

22 lines (16 loc) · 321 Bytes
category
Sensors

useScroll

Reactive scroll position and state

Usage

<script setup lang="ts">
import { useScroll } from '@vueuse/core'

const el = ref<HTMLElement | null>(null)
const { x, y, isScrolling, arrivedState } = useScroll(el)
</script>

<template>
  <div ref="el"></div>
</template>