Skip to content

v-hover

Function Introduction

Triggers a callback after the element

Example

Hover

Usage

typescript
<script setup lang="ts">
  const handler = () => {
    window.alert('Mouse over')
  }
</script>
<template>
  <div
    v-hover="handler"
    :style="{
      width: '200px',
      height: '200px',
      background: 'blue',
      borderRadius: '5px'
      }"
    >
    Hover
  </div>
</template>

Released under the MIT License.