1.0.2 • Published 12 months ago

@miladhp/vue-3-click-outside v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

@miladhp/vue-3-click-outside - a simple, Vue.js composable for handle click outside of an element.

Installation

npm:

npm install @miladhp/vue-3-click-outside --save

yarn:

yarn add @miladhp/vue-3-click-outside --save

pnpm:

pnpm install @miladhp/vue-3-click-outside --save

Use

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

<script setup>
  import { useOnClickOutside } from "@miladhp/vue-3-click-outside";

  const myElement = ref(null);
  useOnClickOutside(myElement, () => {
    console.log("Clicked outside");
  });
</script>
1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago