A simple collection of general-purpose directives for Vue 2/3. Powered by VueUse
yarn add vue-directive-providers
in src/main.(js|ts)
import { createApp } from "vue";
import { ProviderPlugin } from "vue-directive-providers";
import App from "./App.vue";
const app = createApp(App);
//...
app.use(ProviderPlugin);
//...
app.mount("#app");v-provider-arrowsv-provider-closev-provider-focusv-provider-hoverv-provider-outsidev-provider-pressed
<input
v-provider-arrows
:left="functionHere"
:right="functionHere"
:up="functionHere"
:down="functionHere"
/><div v-provider-close :esc="functionHere" /><input v-provider-focus :focused="functionHere" :unfocused="functionHere" /><div v-provider-hover :enter="functionHere" :leave="functionHere" /><div v-provider-outside :outside="functionHere" /><div v-provider-pressed :on="functionHere" :off="functionHere" />