New online demos available.  

InputText

Text input field widget.

General info

  • type: input-text

Params

  • placeholder - an optional string which is displayed as a text placeholder.
  • label - an optional string which is used as an input text label
  • supportText - an option string used as a support text.
  • defaultValue - default value
  • type - a number or text.
  • maxLength - max length of the text.
  • minValue and maxValue - when type is number, allowed range.
  • isTextArea - whether it is a text area or a single line text.
  • rows - if textarea mode is on, a height in rows.

Events

  • onChange - occurs when the user changes the text in the text box.

Referring a value in the config

You may refer a value of a widget using the value or _ shortcut:

{
    "text": "{{$['main-text']._}}"
}

Example

  {
      "name": "main-text",
      "type": "input-text",
      "params": {
          "isTextArea": true,
          "defaultValue": "Hello world",
          "prompt": "Enter your text",
          "maxLength": 20
      }
  }