Link

Demos

<template>
<article>
  <section>
    <h4>Router link</h4>
    <div>
      <veui-link :to="{ name: 'components-icon' }">
        Previous
      </veui-link>
    </div>
  </section>
  <section>
    <h4>Native link</h4>
    <div>
      <veui-link
        native
        to="./pagination"
      >
        Next
      </veui-link>
    </div>
  </section>
</article>
</template>

<script>
import { Link } from 'veui'

export default {
  components: {
    'veui-link': Link
  }
}
</script>

API

Props

NameTypeDefaultDescription
uistring-

Style variants.

ValueDescription
primaryPrimary style.
auxAuxiliary style.
successSuccess style.
warningWarning style.
alertAlert style.
tostring|Object-Denotes the target route of the link. When used with Vue Router, the value will be passed to a <router-link>'s to prop. Otherwise only string type is supported, and the value will output to the href attribute of an <a> element.
relstring-Specifies the relationship of the target object to the link object. Refer to MDN for more details.
targetstring-

Specifies where to display the linked content. Refer to MDN for more details.

When target has a value of _blank, a noopener token will be automatically added into rel (if not already exist) to enhance safety for free.

nativebooleanfalseWhether to enforce the use of native <a> element (instead of <router-link>).
fallbackstring'span'Specifies the fallback element type when no to prop is specified.
disabledbooleanfalseWhether the link is disabled.

Slots

NameDescription
defaultThe content of the link.

Events

NameDescription
clickTriggered upon clicks when the to prop is falsy or the native prop is true. The callback parameter list is (event), where the type of event is HTML's native Event.