page LoadingButtoncomponent { seo { title = "LoadingButton component" description = "Reusable loading button component." } view {
W WRNexusJS
actions component

LoadingButton

Reusable loading button component.

@wrnexus/ui 0.2.657 props0 slots0 events

Usage

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

<LoadingButton label="Continue" loadingLabel="Loading…" loading="false" disabled="false" type="button" />

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

Props and attributes

PropTypeRequirementDefault
labelstringOptional"Continue"
loadingLabelstringOptional"Loading…"
loadingbooleanOptionalfalse
disabledbooleanOptionalfalse
typestringOptional"button"
variantstringOptional"primary"
classstringOptional""

Slots

This component does not declare a slot.

Events

This component does not declare a custom event.

Source contract

Installed source: components/LoadingButton.wrn

component LoadingButton {
  props {
    label = "Continue"
    loadingLabel = "Loading…"
    loading = false
    disabled = false
    type = "button"
    variant = "primary"
    class = ""
  }
  view {
    <button type="{type}" disabled="{disabled || loading}" aria-disabled="{disabled || loading}" aria-busy="{loading}" class="wire-btn wire-btn--{variant} wire-loading-button {class}"><span data-show="loading" class="wire-spinner wire-spinner--inline" aria-hidden="true"></span><span>{loading ? loadingLabel : label}</span></button>
  }
}
} }