page InputNumbercomponent { seo { title = "InputNumber component" description = "Theme-aware, responsive input number component." } view {
W WRNexusJS
advanced-forms component

InputNumber

Theme-aware, responsive input number component.

@wrnexus/ui 0.3.613 props0 slots0 events

Usage

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

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

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

Props and attributes

PropTypeRequirementDefault
sizestringOptional"default"
colorstringOptional"primary"
labelstringOptional"Input Number"
namestringOptional""
valuestringOptional""
placeholderstringOptional""
typestringOptional"number"
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/InputNumber.wrn

component InputNumber {
  props {
    size = "default"
    color = "primary"
    label = "Input Number"
    name = ""
    value = ""
    placeholder = ""
    type = "number"
    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-number {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>
    }
}
} }