Skip to content
W WRNexusJS
actions component

ExternalLink

Reusable external link component.

@wrnexus/ui 0.2.676 props1 slots0 events

Usage

Components are auto-discovered. Use the component directly in any .wrn view:

<ExternalLink
  label="Action"
  href="href"
  type="button"
  variant="primary"
  disabled="false"
/>

Legacy mount name: data-component="ExternalLink".

Props and attributes

PropTypeRequirementDefault
labelstringOptional"Action"
hrefstringOptional""
typestringOptional"button"
variantstringOptional"primary"
disabledbooleanOptionalfalse
classstringOptional""

Slots

  • default

Events

This component does not declare a custom event.

Source contract

Installed source: components/ExternalLink.wrn

component ExternalLink {
  props {
    label = "Action"
    href = ""
    type = "button"
    variant = "primary"
    disabled = false
    class = ""
  }
  view {
        <span class="wire-catalog-action {class}">
        <a data-show="href" href="{href}" class="wire-btn wire-btn--{variant}">{label}<slot />
        </a>
        <button data-show="!href" type="{type}" disabled="{disabled}" class="wire-btn wire-btn--{variant}">{label}<slot />
        </button>
        </span>
    }
}