<c-link>
Basic hyperlink component
Examples
<template>
<div class="example-row">
<c-link href="https://csc.fi">Default link</c-link>
<c-link href="https://csc.fi" underline>Underlined link</c-link>
<c-link href="https://csc.fi" target="_blank">Opens in a new tab</c-link>
<c-link href="https://csc.fi" weight="400">Normal weight</c-link>
</div>
</template>
API reference
<c-link>
Basic hyperlink component
Properties
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
href | href | string | '' | Url of link |
target | target | string | '' | regular target attribute of a hyperlink |
underline | underline | boolean | false | Display line under the link |
weight | weight | number | string | '600' | Customisable font weight |
Slots
| Slot | Description |
|---|---|
default | The visible content of the link |
CSS parts
Style from outside with c-link::part(name) — parts are the library's only styling customization API.
| Part | Description |
|---|---|
root | The native `<a>` element carrying the link styling |