page Inputcomponent { seo { title = "Input component" description = "Theme-aware, responsive input component." } view {
W WRNexusJS
forms component

Input

Theme-aware, responsive input component.

@wrnexus/ui 0.3.513 props0 slots0 events

Usage

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

<Input
  size="default"
  color="primary"
  label="Input"
  name="name"
  value="value"
/>

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

Props and attributes

PropTypeRequirementDefault
sizestringOptional"default"
colorstringOptional"primary"
labelstringOptional"Input"
namestringOptional""
valuestringOptional""
placeholderstringOptional""
typestringOptional"text"
minstringOptional""
maxstringOptional""
stepstringOptional""
disabledbooleanOptionalfalse
requiredbooleanOptionalfalse
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

component Input {
  props {
    size = "default"
    color = "primary"
    label = "Input"
    name = ""
    value = ""
    placeholder = ""
    type = "text"
    min = ""
    max = ""
    step = ""
    disabled = false
    required = false
    class = ""
  }
  view {
        <label class="wire-next wire-next--color-{color} wire-next--size-{size} wire-next--field wire-next--input {class}">
        <span>{label}</span>
        <input {...attrs} type="{type}" name="{name}" value="{value}" placeholder="{placeholder}" min="{min}" max="{max}" step="{step}" disabled="{disabled}" required="{required}" />
        </label>
    }
}
} }