Link
Usage
Import the component from its dedicated entry. Structural styles are loaded automatically.
vue
<script setup lang="ts">
import { Link } from '@astryx-vue/core/Link'
</script>
<template>
<Link href="/docs">
Documentation
</Link>
<Link href="https://github.com" is-external-link>
GitHub
</Link>
</template>Best practices
| Guidance | Practice |
|---|---|
| Recommended | Use link text that describes the destination, e.g. "View docs" or "Contact us". Avoid "click here". |
| Recommended | Use isExternalLink for off-site links to add target="_blank" and rel="noopener noreferrer". |
| Recommended | Use color="secondary" to reduce visual weight in groups of links or paragraphs. |
| Don't | Make every piece of text a link; it weakens link discoverability. |
| Don't | Make a critical action only a link. Important actions should use Button. |
Examples
Colors
Links come in primary, secondary, accent, and inherit color variants. Without a color prop a link uses accent.
External link
isExternalLink opens in a new tab, adds an external indicator, and sets safe rel values.