vue-linkify-vue3

A simple Vue directive to turn URL's and emails into clickable links. Maintained fork with Vue 2.7+ and Vue 3 support.
7,558
Install
npm install vue-linkify-vue3
Latest Version:2.0.3
Vue:2 · 3
License:MIT
Last Updated:Oct 8, 2025
Links: GitHub  ·  npm
Maintainer: ali0113

vue-linkify

A simple Vue directive to turn URL's and emails into clickable links. Based on SoapBox's Linkify.

Note: This is a maintained fork of the original vue-linkify which is no longer maintained. This version includes updated dependencies, security fixes, and supports both Vue 2.7+ and Vue 3.

Install

This directive can be installed as a module:

$ npm install vue-linkify-vue3

or, if you're not in a module environment, just include it as a <script>.

Basic Usage

In a browser environment, you should now have a v-linkified directive set up for free. If you're in a module environment, just import and register it as you please:

For Vue 3:

import { createApp } from 'vue'
import linkify from 'vue-linkify'

const app = createApp(App)
app.directive('linkified', linkify)

For Vue 2:

import Vue from 'vue'
import linkify from 'vue-linkify'

Vue.directive('linkified', linkify)

And then you use it away:

<template>
  <div id="app">
    <div v-html="raw" v-linkified />
  </div>
</template>
<script>
export default {
  data () {
    return {
      raw: 'Hello from vuejs.org'
    }
  }
}
</script>

The above snippet will yield:

Hello from <a href="http://vuejs.org" class="linkified" target="_blank">vuejs.org</a>

Advanced Slightly Less Basic Usage

You can also pass an options argument, which takes an Object, into the directive to control its behavior. For example, modifying the above template into something like this:

<template>
  <div id="app">
    <div v-html="raw" v-linkified:options="{ className: 'foo' }" />
  </div>
</template>

will yield a slightly different HTML:

Hello from <a href="http://vuejs.org" class="foo" target="_blank">vuejs.org</a>

A list of available options is available here.

Maintainer

This fork is maintained by shekh.

Credits

Original package created by Phan An.

License

MIT

Original work © Phan An
Modified work © shekh

Related Packages

vue-linkify

A simple Vue directive to turn URL's and emails into clickable links

294,529
v-linkify

A simple Vue directive to turn URL's and emails into clickable links

11,676 3
vue-autolink

Auto-link url and images in Vue components

1,566
@linksense/vue

Vue composables for URL platform detection — useLinkSense, useDetectAll, useNorm...

915
vue3-highlight-text

a vue3 directive of highlight text

84,789

Version History

Version Released Vue License
2.0.3 ^2.7.0 || ^3.0.0 MIT
2.0.2 ^2.7.0 || ^3.0.0 MIT
2.0.1 ^2.7.0 || ^3.0.0 MIT
2.0.0 ^2.7.0 || ^3.0.0 MIT