## Vue & Directive
By default, all gestures will trigger native DOM events, so in vue, you can use syntax such as "@tap" to listen for gesture events directly on template elements.
```html
```
**Note**: The syntax "**@tap**" in vue can only be used on element tags, but not on custom component tags:
```html
```
### Directive
To simplify further, you can use `@any-touch/vue3` directly, which is a vue3 directive.
#### Install
```
npm i -S @any-touch/vue3
```
#### Run
```javascript
// main.js
import VTouch from '@any-touch/vue3';
const app = createApp();
app.use(VTouch);
```
You can now use the `v-touch` directive in templates to add gesture recognition to the current element.
``` html
// xx.vue
```
[More](/packages/vue3/README.md)
### Compared
1. The directive version can be used on **elements/vue components**, while the native version only supports elements.
2. The instruction version **does not support on-demand loading** for the time being. For library developers, it is recommended to use the native version.
[:rocket: back to directory](../README.md#directory)