Link
Theme-aware, responsive link component.
Usage
Components are auto-discovered. Use the component directly in any .wrn view:
<Link
size="default"
color="primary"
label="Link"
href="#"
target="target"
/>Legacy mount name: data-component="Link".
Props and attributes
| Prop | Type | Requirement | Default |
|---|---|---|---|
size | string | Optional | "default" |
color | string | Optional | "primary" |
label | string | Optional | "Link" |
href | string | Optional | "#" |
target | string | Optional | "" |
rel | string | Optional | "" |
external | boolean | Optional | false |
class | string | Optional | "" |
Slots
default
Events
This component does not declare a custom event.
Source contract
Installed source: components/Link.wrn
component Link {
props {
size = "default"
color = "primary"
label = "Link"
href = "#"
target = ""
rel = ""
external = false
class = ""
}
view {
<a {...attrs} href="{href}" target="{target}" rel="{rel}" class="wire-next wire-next--color-{color} wire-next--size-{size} wire-next--link {class}">
<slot>{label}</slot>{#if external}<span aria-hidden="true">↗</span>{/if}</a>
}
}