page FormLabelcomponent { seo { title = "FormLabel component" description = "Reusable form label component." } view {
W WRNexusJS
content component

FormLabel

Reusable form label component.

@wrnexus/ui 0.2.655 props0 slots0 events

Usage

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

<FormLabel for="for" label="Label" required="false" optional="false" />

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

Props and attributes

PropTypeRequirementDefault
forstringOptional""
labelstringOptional"Label"
requiredbooleanOptionalfalse
optionalbooleanOptionalfalse
classstringOptional""

Slots

This component does not declare a slot.

Events

This component does not declare a custom event.

Source contract

Installed source: components/FormLabel.wrn

component FormLabel {
  props {
    for = ""
    label = "Label"
    required = false
    optional = false
    class = ""
  }
  view {
    <label for="{for}" class="wire-label {class}">{label}<span data-show="required" class="wire-required" aria-hidden="true"> *</span><span data-show="optional && !required" class="wire-optional"> (optional)</span></label>
  }
}
} }