useElementHover
Reactive element's hover state.
Usage
<template>
<button ref="myHoverableElement">
{{ isHovered }}
</button>
</template>
<script setup>
import { useElementHover } from '@vueuse/core'
const myHoverableElement = ref()
const isHovered = useElementHover(myHoverableElement)
</script>
Type Declarations
export declare function useElementHover(el: MaybeRef<EventTarget>): Ref<boolean>