On this page
useElementByPoint
Category | Sensors |
---|---|
Export Size | 642 B |
Last Changed | 2 weeks ago |
Reactive element by point.
Usage
import { useElementByPoint, useMouse } from '@vueuse/core'
const { x, y } = useMouse({ type: 'client' })
const { element } = useElementByPoint({ x, y })
Type Declarations
export interface UseElementByPointOptions extends ConfigurableDocument {
x: MaybeRefOrGetter<number>
y: MaybeRefOrGetter<number>
}
/**
* Reactive element by point.
*
* @see https://vueuse.org/useElementByPoint
* @param options - UseElementByPointOptions
*/
export declare function useElementByPoint(options: UseElementByPointOptions): {
isActive: Readonly<Ref<boolean>>
pause: Fn
resume: Fn
element: Ref<HTMLElement | null>
}
export type UseElementByPointReturn = ReturnType<typeof useElementByPoint>
Source
© 2019-present Anthony Fu
Licensed under the MIT License.
https://vueuse.org/core/useElementByPoint/