vue-clickoutside
A Vue directive about listener a click outside an element.
9,169
10
| Install | |
|---|---|
npm install vue-clickoutside |
|
| Latest Version: | 0.2.0 |
| Vue: | 1 |
| License: | MIT |
| Last Updated: | Oct 10, 2016 |
| Links: | GitHub · npm |
Maintainer: qingwei.li
vue-clickoutside
make a click outside event.
Similar vue-clickaway, but more simpler. :P
Installation
npm i vue-clickoutside -D
Demo

Quick Start
import Vue from 'vue'
import VueClickoutside from 'vue-clickoutside'
Vue.use(VueClickoutside)
// or custom directive id
Vue.directive('v-clickoutside', VueClickoutside)
<div v-clickoutside="show = false" class="box">
<button @click="show = true">click me</button>
<div v-show="show">dropdown</div>
</div>
Development
If you using NPM 3.x, these will not be automatically installed.
- jasmine-core *
- phantomjs-prebuilt ^1.9
License
Related Packages
v3-click-outside
Vue3 directive to react on clicks outside an element. Its simple to use. And can...
22,256
4
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.2.0 | ^1.0.21 | MIT | |
| 0.1.0 | ^1.0.21 | MIT | |
| 0.0.4 | ^1.0.21 | MIT | |
| 0.0.3 | ^1.0.21 | MIT | |
| 0.0.2 | ^1.0.21 | MIT | |
| 0.0.1 | ^1.0.21 | MIT |