# v-click-outside-x
Vue V2 directive to react on `clicks` outside an element.
## Install
```bash
$ npm install --save v-click-outside-x
```
```bash
$ yarn add v-click-outside-x
```
## Use
```js
import Vue from 'vue';
import * as vClickOutside from 'v-click-outside-x';
Vue.use(vClickOutside);
```
```js
```
## Directive
```js
import * as vClickOutside from 'v-click-outside-x'
```
## Event Modifiers
It is not a very common need to call `event.preventDefault()`, `event.stopPropagation()` or
`event.stopImmediatePropagation()` for click outside event handlers.
Care should be taken when using these!
The need for capture though, is reasonably common when you want menus or dropdown to
behave more like their native elements.
```js
```
## Pointer Events Examples
By default, if no argument is supplied then `click` will be used. You can specify
the event type being bound by supplying an arguments, i.e. `pointerdown`.
```js
```
For support of the [PointerEvent API](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent),
consider loading the [Pointer Events Polyfill](https://www.npmjs.com/package/pepjs).
# Multiple Events Examples
```js
```
## License
[MIT License](https://github.com/ndelvalle/v-click-outside-x/blob/master/LICENSE)