vue-3-linkify

Linkify.js for Vue.js 3
95,144 4
Install
npm install vue-3-linkify
Latest Version:1.1.0
Vue:3
License:MIT
Last Updated:Jul 20, 2022
Links: GitHub  ·  npm
Maintainer: say8425

Vue 3 Linkify

NPM Test Release License

Vue 3 directive to turn URL and emails into anchor tag that use Linkify.js.

Demo vue-3-linkify

Installation

npm install --save vue-3-linkify
yarn add vue-3-linkify

Recommended to use npm or yarn to install.

Usage

Register plugin

import { createApp } from "vue";
import App from "./App.vue";
import Vue3linkify from "vue-3-linkify";

const app = createApp(App);

app.use(Vue3linkify)
app.mount('#app')

Use directive

<template>
  <div v-linkify>
    ...
  </div>
</template>

Use directive with options

<template>
  <div v-linkify:options="{
    target: '_blank',
  }">
    ...
  </div>
</template>

You can use the linkify options.

Add event listener

<template>
  <div v-linkify:options="{
    target: '_blank',
    attributes: {
      onclick: 'event.stopPropagation()',
    },
  }">
    ...
  </div>
</template>

Unfortunately, the events option is not supported in linkify.js. But you can add event listeners to attributes options manually.

Related Packages

@vesperjs/vue

This is Vesper for Vue.js.

8,552 1
@wzpo/md-ui

Another Momentum UI framework for Vue.js applications

2,054
vuenilla

Unstyled Vue.js component library.

1,552 2
vue-awesome

Font Awesome component for Vue.js, using inline SVG.

510,216 2,422
vue-window-size

Reactivity window size for Vue.js.

219,064 121

Version History

Version Released License
1.1.0 MIT
1.0.0 MIT
Pre-releases (1)
Version Released License
2.0.0-beta-0 MIT