Link
The Link component outputs a link to a URL.
Basic link
API
| Parameter | Default | Description |
|---|---|---|
|
componentElement
|
span | - |
|
slot
|
Undefined label | The content of the link |
|
href
|
Where should the link go to? | |
|
target
|
_top | Link target attribute. Default is _top. Allowed values are _blank, _self, _parent or _top. This is only added if href is not empty. |
|
keepContent
|
true | If link is empty, should we show content anyways? Prints the content wrazpped by a span element. |
|
keepWrapper
|
true | If link is empty and keepContent is true, should we keep the span added by keepContent? If false, it will print the content without any wrapping element. |
|
xfn
|
false | Relation to the link (ex. nofollow) |
|
unstyled
|
false | If true, all link styles will use inherit from parent element. |
CSS API
| Variable | Default | Type | Values | Description |
|---|---|---|---|---|
|
--c-link--color--background-contrast
|
var(--color--background-contrast) | color | - | The contrast of the selected palette will be used. |