Guide
Guide
Getting started
Getting started
App shell
App shell
Conventions
Conventions
Data layer
Data layer
Theming
Theming
Releases
Releases
Layout
Layout
Actions bar
Actions bar
Header bar
Header bar
Nav bar
Nav bar
Actions
Actions
Button
Button
Links
Links
Controls
Controls
Input
Input
Select
Select
Toggle
Toggle
Checkbox
Checkbox
Form
Form
Button group
Button group
Date picker
Date picker
Field wrapper
Field wrapper
File picker
File picker
Slider
Slider
Tabs
Tabs
Display
Display
Chip
Chip
Counter
Counter
Expansion
Expansion
Image viewer
Image viewer
Info card
Info card
Number formatter
Number formatter
Page error
Page error
Progress
Progress
Query boundary
Query boundary
Query status
Query status
Skeleton
Skeleton
Spinner
Spinner
Status icon
Status icon
Text overflow
Text overflow
Data
Data
Charts
Charts
Drag container
Drag container
Infinite list
Infinite list
List
List
Report pages
Report pages
Overlays
Overlays
Bottom sheet
Bottom sheet
Dropdown
Dropdown
Dropdown menu
Dropdown menu
Modal
Modal
Notify
Notify
Tooltip
Tooltip
Utilities
Utilities
Border SVG
Border SVG
Click outside
Click outside
Composables
Composables
Empty component
Empty component
Formatting
Formatting
Helpers
Helpers
Shine
Shine
Assets
Assets
Icons
Icons
Recipes
Recipes
Form in three modes
Form in three modes
List with fields
List with fields

EcoVueUI Library

GuideComponentsRecipesv0.26.20
On this page

Links ​

WLink is a link inside text, with an icon in a colored chip before it — a link icon by default, or icon. The text is text or the default slot. It is a router link with to and a plain link with href; target and rel go on the link either way. semanticType sets the color, primary by default.

WLinkArrow is a quiet "more" link with an arrow after the text, e.g. under a short list: <WLinkArrow :to="{name: RouteName.PLANTS}" text="All plants" />.

WRouterLink renders the app's RouterLink with to, and a plain a with href otherwise — also in an app without vue-router. The kit's links and buttons are built on it.

Each plant links to its Monstera deliciosa article. The RHS plant guide explains how to care for it.

vue
<template>
  <p class="max-w-xl leading-relaxed">
    Each plant links to its
    <WLink
      href="https://en.wikipedia.org/wiki/Monstera_deliciosa"
      text="Monstera deliciosa"
      target="_blank"
      rel="noopener"
    />
    article. The
    <WLink
      href="https://www.rhs.org.uk/plants"
      target="_blank"
      rel="noopener"
      :semantic-type="SemanticType.INFO"
      :icon="markRaw(IconArchiveBook)"
    >
      RHS plant guide
    </WLink>
    explains how to care for it.
  </p>
</template>

<script lang="ts" setup>
import {markRaw} from 'vue'

import {SemanticType} from 'eco-vue-js/dist/utils/SemanticType'

import WLink from 'eco-vue-js/dist/components/Link/WLink.vue'

import IconArchiveBook from 'eco-vue-js/dist/assets/icons/IconArchiveBook'
</script>

API ​

WLink ​

ts
import WLink from 'eco-vue-js/dist/components/Link/WLink.vue'

Props ​

PropTypeDefaultDescription
hrefstring—URL of the link, when there is no to.
target"_self" | "_blank" | "_parent" | "_top"—target attribute of the link.
relstring—rel attribute of the link.
textstring—Text of the link. The default slot replaces it.
semanticTypeSemanticTypeSemanticType.PRIMARYColor of the text and the icon's chip.
iconSVGComponent—Icon before the text, in a chip. Defaults to a link icon.
toRouteLocationRaw—Router location — renders a router link. Needs vue-router installed in the app.

Slots ​

SlotPropsDescription
default—Text of the link, replacing text.

WLinkArrow ​

ts
import WLinkArrow from 'eco-vue-js/dist/components/Link/WLinkArrow.vue'

Props ​

PropTypeDefaultDescription
textstring—Text of the link. The default slot replaces it.
toRouteLocationRawrequiredRouter location — renders a router link. Needs vue-router installed in the app.

Slots ​

SlotPropsDescription
default—Text of the link, replacing text.

WRouterLink ​

ts
import WRouterLink from 'eco-vue-js/dist/components/RouterLink/WRouterLink.vue'

Props ​

PropTypeDefaultDescription
hrefstring—URL of a plain link, used when to is empty.
replaceboolean—Replaces the current history entry instead of adding one, with to.
toRouteLocationRawrequiredRouter location — renders a router link. Needs vue-router installed in the app.

Slots ​

SlotPropsDescription
default—Content of the link.
Edit this page

Last updated:

Pager
Previous pageButton
Next pageInput