Link

Display a styled link.

Usage

Using to will render a NuxtLink component whilst using the href prop will append an external icon and render an anchor tag.

      <template>
  <CLink href="http://example.com">
    Example link
  </CLink>
</template>

    

Destructive

      <template>
  <CLink destructive />
</template>

    

Text

Use the text prop as an alternative to the default slot.

      <template>
  <CLink text="Example text" />
</template>

    

Props

Prop Default Type
to string | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric
Route Location the link should navigate to when clicked on.
text string
destructiveboolean
icon string
custom false
Whether RouterLink should not wrap its content in an a tag. Useful when using v-slot to create a custom RouterLink
target null | "_self" | "_blank" | "_parent" | "_top" | string & {}
Where to display the linked URL, as the name for a browsing context.
trailingSlash "append" | "remove"
An option to either add or remove trailing slashes in the href for this specific link. Overrides the global trailingSlash option if provided.