All Projects → Developmint → vue-link

Developmint / vue-link

Licence: MIT license
One component to link them all 🔗

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to vue-link

vue-plausible
Plausible Analytics Vue.js Plugin and NuxtJS Module
Stars: ✭ 107 (+64.62%)
Mutual labels:  nuxt, vue-plugin, nuxtjs
Vuemmerce
👉 Responsive ecommerce template 🛒 built with Vue.js and Nuxt.js
Stars: ✭ 223 (+243.08%)
Mutual labels:  nuxt, vue-components, nuxtjs
Vue Awesome Swiper
🏆 Swiper component for @vuejs
Stars: ✭ 12,072 (+18472.31%)
Mutual labels:  vue-components, vue-plugin, nuxtjs
fastify-vue
A nuxt.js fastify plugin
Stars: ✭ 27 (-58.46%)
Mutual labels:  nuxt, nuxtjs
unnue-nuxt
开媛笔记,基于nuxt ssr首屏服务器端渲染 ⚡。用于分享、记录、交流和学习,希望可以帮助到小伙伴们。同时网站在永久更新,备好鸡血,一起来战 Ooh aah!
Stars: ✭ 98 (+50.77%)
Mutual labels:  nuxt, nuxtjs
solidata frontend
first draft for solidata_frontend : vue+nuxt+vuetify+i18n+axios
Stars: ✭ 15 (-76.92%)
Mutual labels:  nuxt, nuxtjs
nuxt-typo3
TYPO3 Frontend rendered in Vue.js and Nuxt (frontend for EXT:headless)
Stars: ✭ 66 (+1.54%)
Mutual labels:  nuxt, nuxtjs
nuxtjsbrasil.github.io
Site da comunidade Nuxt Brasil (usando Nuxtjs) 😄
Stars: ✭ 21 (-67.69%)
Mutual labels:  nuxt, nuxtjs
platform
Community platform for dancers
Stars: ✭ 30 (-53.85%)
Mutual labels:  nuxt, nuxtjs
LaraNuxt
Laravel framework with integrated NuxtJs support, preconfigured for eslint, jest and vuetify.
Stars: ✭ 53 (-18.46%)
Mutual labels:  nuxt, nuxtjs
nuxt-ts-module
A tiny module to use Typescript within Nuxt.js application.
Stars: ✭ 21 (-67.69%)
Mutual labels:  nuxt, nuxtjs
nuxt
Nuxt 3 and Vue 3 client for genealogy project. Family tree and genealogy data processing website software client.
Stars: ✭ 97 (+49.23%)
Mutual labels:  nuxt, nuxtjs
nuxtswagger
Nuxt-TS-Swagger
Stars: ✭ 17 (-73.85%)
Mutual labels:  nuxt, nuxtjs
zksync-dapp-checkout
zkCheckout — trustable permissionless DeFi payment gateway. Brand new zkSync dApp w/t all L2 perks: fast&cheap transfers / simple&quick withdrawal
Stars: ✭ 37 (-43.08%)
Mutual labels:  nuxt, nuxtjs
nuxt-gsap-module
GSAP module for Nuxt.js
Stars: ✭ 183 (+181.54%)
Mutual labels:  nuxt, nuxtjs
now-nuxt
A Now v2 Nuxt builder
Stars: ✭ 25 (-61.54%)
Mutual labels:  nuxt, nuxtjs
vue-swimlane
A Text Swimlane plugin for Vue.js
Stars: ✭ 71 (+9.23%)
Mutual labels:  vue-components, vue-plugin
bluise
🍄 Bluise - A Nuxt.js & Netlify CMS boilerplate.
Stars: ✭ 132 (+103.08%)
Mutual labels:  nuxt, nuxtjs
nuxt-interpolation
Nuxt.js module as directive for binding every link to catch the click event, and if it's a relative link router will push.
Stars: ✭ 38 (-41.54%)
Mutual labels:  links, nuxt
Recursos Gratuitos
🌈 Uma coleção com links de recursos gratuitos para desenvolvimentos e estudos.
Stars: ✭ 1,353 (+1981.54%)
Mutual labels:  links, link

VueLink - One component to link them all!

Build Status Code coverage Downloads Version License We use Conventional Commits Thanks badge

Lightweight wrapper component for external and vue-router links.

🔥 Features

  • Tiny functional component
  • SSR-safe (works with Nuxt.js)
  • Well tested and documented
  • Compatible with Node 8.0+
  • Vue (and vue-router) as the only dependencies
  • Highly customizable

🔎 Getting started

📦 Through NPM

$ npm install vue-link

Synchronous import

import VueLink from 'vue-link'
// or the slash-forcing variants
// import { VueLink, VueLinkAddSlash, VueLinkStripSlash } from 'vue-link'

export default {
  components: {
    VueLink
  }
}

Async import

export default {
  components: {
    VueLink: () => import('vue-link')
  }
}

🔗 Using a CDN

Sorry! No CDN available for VueLink right now.

🛠️ Usage

Handling

Before going into detail, keep in mind that you can customize the component as you can do it with a normal <a> or <router-link>/<nuxt-link> tag.

All props will be passed down to the internal implementation of vue-link in case the link is not external.

Link detection

If the passed link starts with http, it'll be treated as external link. You can use the external prop to force treating it as external link as well.

Prop overview

Prop External only? Comment
to The target of the link. If not set, the link will not be bound (no "empty href")
rel Will be passed as rel attribute to the anchor tag
newTab If truthy, set target attribute to _blank
target Will be passed as target attribute to the anchor tag
slashes Internal only! Settings: 'strip', 'add' or false(default). Will force slash endings to either strip or add trailing slashes to your url (/a -> /a/ in add mode, vice-versa in strip. Only for internal links! Also, this will not take query strings into account. Please use router-link's query option for them
external Force to treat the link as external link (use anchor instead of vue-router tag)

Types

With v1.4.0 two extra components were introduced that reflect the slashes settings. You can import them (like the normal VueLink component as named imports). The default export of the package is still the normal VueLink component so no breaking changes have been introduced.

Since v1.6.0, a dedicated ForNuxt export is available that'll use NuxtLink instead of RouterLink under the hood

import { VueLink, VueLinkAddSlash, VueLinkStripSlash, ForNuxt } from '../lib'

Example usage

 <vue-link
          :to="`/feed.xml`"
          :external="true"
          :new-tab="true"
          class="block mt-4 lg:inline-block lg:mt-0 w-6 h-6 mr-6 no-underline">
    This is the link text ;)
</vue-link>

⚙️ Contributing

Please see our CONTRIBUTING.md

📑 License

MIT License - Copyright (c) Developmint - Alexander Lichter

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].