Skip to content

Input

A single-line field for text, a number or an email address.

Use it for: Inside a Form, bound to one field of the form’s model.

  • CategoryInput
  • ChildrenNone
  • DataOne field (bindings.value)
  • ActionNone
Prop Required Accepts What it does
label Yes text, up to 200 characters The visible label, also read by VoiceOver.
required No true or false The form cannot be saved while this is empty.
disabled No true or false Show it greyed out and ignore taps.
inputType Yes text, number, email Which keyboard to show and what kind of value to accept.
placeholder No text, up to 200 characters Grey hint text shown while the field is empty.

Every component also accepts id (required, unique on its screen), and the optional preset and style described in Style options.

From the fitness example project:

{
"id": "name",
"type": "Input",
"props": {
"label": "Workout name",
"inputType": "text",
"required": true
},
"bindings": {
"value": {
"model": "workout",
"field": "name"
}
}
}