@manusanchev/vue3-clickaway
Vue 3 directive to detect clickaway events
16,020
| Install | |
|---|---|
npm install @manusanchev/vue3-clickaway |
|
| Latest Version: | 1.1.4 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Oct 30, 2023 |
| Links: | npm |
Maintainer: manusanchev
vue3 ClickAway
Vue 3 directive to detect clickaway events
Install
PNPM
pnpm add @manusanchev/vue3-clickaway
Yarn
yarn install @manusanchev/vue3-clickaway
NPM
npm install @manusanchev/vue3-clickaway
Register
Vue 3
import { createApp } from "vue";
import ClickAway from "@manusanchev/vue3-clickaway";
import App from "./App.vue";
const app = createApp(App);
app.use(ClickAway);
app.mount("#app");
Nuxt 3
plugins/clickaway.client.ts
import ClickAway from "@manusanchev/vue3-clickaway";
export default defineNuxtPlugin(nuxtApp => {
nuxtApp.vueApp.use(ClickAway);
});
Usage
<script setup lang="ts">
function onClickAway() {
// your code here
}
</script>
<template>
<div v-clickaway="onClickAway">
<!-- Content -->
</div>
</template>
Related Packages
@eduvia-app/nuxt-can
Nuxt directives (`v-can`, `v-cannot`) to layer permissions without touching busi...
1,214
0
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.1.4 | ^3.x.x | MIT | |
| 1.1.3 | ^3.x.x | MIT | |
| 1.1.2 | ^3.x.x | MIT | |
| 1.1.1 | ^3.x.x | MIT | |
| 1.1.0 | ^3.x.x | MIT | |
| 1.0.6 | MIT | ||
| 1.0.5 | ISC | ||
| 1.0.4 | ISC | ||
| 1.0.3 | MIT | ||
| 1.0.2 | ISC | ||
| 1.0.1 | ISC | ||
| 1.0.0 | ISC |