Components
Components

Input

Tag: <we-input>
Standard module: we_input

General input control for text and other HTML input types. Validation and focus methods are public.

Features

  • Handles several HTML input types and forwards required state to the native input.
  • Exposes focus, selection, and validation methods.

Public parameters

JavaScript property HTML attribute Type Initial value Purpose
label label String '' Text label shown to the user.
type type String 'text' HTML input type.
name name String '' Form or field name.
placeholder placeholder String '' Text shown before a value is selected.
fieldValue field-value String '' Current field value.
checked checked Boolean false Checked state for checkbox-like inputs.
required required Boolean false Whether the value is required.
disabled disabled Boolean false Whether interaction is disabled.
min min String '' Minimum input value.
max max String '' Maximum input value.
step step String '' Input step.
helpText help-text String '' Supporting text shown with the control.

Public methods

  • focus() is exposed by @apiFunction.
  • blur() is exposed by @apiFunction.
  • click() is exposed by @apiFunction.
  • select() is exposed by @apiFunction.
  • checkValidity() is exposed by @apiFunction.
  • reportValidity() is exposed by @apiFunction.

Events

  • change is emitted as a DOM custom event.

Source: working/environment_modules/standard/we_input/WebComponent/WeInput.js.

All components