Skip to content
W WRNexusJS
core component

input

Reusable input component.

@wrnexus/ui 0.2.675 props0 slots0 events

Usage

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

<input
  type="text"
  name="name"
  value="value"
  placeholder="placeholder"
/>

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

Props and attributes

PropTypeRequirementDefault
typestringOptional"text"
namestringOptional""
valuestringOptional""
placeholderstringOptional""
classstringOptional""

Slots

This component does not declare a slot.

Events

This component does not declare a custom event.

Source contract

Installed source: components/input.wrn

// Text input. Pairs with the validation system (name maps to a field).
component Input {
  props {
    type = "text"
    name = ""
    value = ""
    placeholder = ""
    class = ""
  }
  view {
        <input type="{type}" name="{name}" value="{value}" placeholder="{placeholder}" class="wire-input {class}">
    }
}