page Linkcomponent { seo { title = "Link component" description = "Theme-aware, responsive link component." } view {
W WRNexusJS
layout component

Link

Theme-aware, responsive link component.

@wrnexus/ui 0.3.58 props1 slots0 events

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

PropTypeRequirementDefault
sizestringOptional"default"
colorstringOptional"primary"
labelstringOptional"Link"
hrefstringOptional"#"
targetstringOptional""
relstringOptional""
externalbooleanOptionalfalse
classstringOptional""

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>
    }
}
} }