Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Apply VueUse composables in Vue 3/Nuxt projects to replace custom implementations with battle-tested utilities.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/useElementByPoint.md
1---2category: Sensors3---45# useElementByPoint67Reactive element by point.89## Usage1011```ts12import { useElementByPoint, useMouse } from '@vueuse/core'1314const { x, y } = useMouse({ type: 'client' })15const { element } = useElementByPoint({ x, y })16```1718## Type Declarations1920```ts21export interface UseElementByPointOptions<Multiple extends boolean = false>22extends ConfigurableDocument, ConfigurableScheduler {23x: MaybeRefOrGetter<number>24y: MaybeRefOrGetter<number>25multiple?: MaybeRefOrGetter<Multiple>26/** @deprecated Please use `scheduler` option instead */27immediate?: boolean28/** @deprecated Please use `scheduler` option instead */29interval?: "requestAnimationFrame" | number30}31export interface UseElementByPointReturn<Multiple extends boolean = false>32extends Supportable, Pausable {33element: ShallowRef<34Multiple extends true ? HTMLElement[] : HTMLElement | null35>36}37/**38* Reactive element by point.39*40* @see https://vueuse.org/useElementByPoint41* @param options - UseElementByPointOptions42*/43export declare function useElementByPoint<M extends boolean = false>(44options: UseElementByPointOptions<M>,45): UseElementByPointReturn<M>46```47