Text Input
A free text entry field. Stores a .string value. Fires action on submit (return key).
Type
"textInput"
Relevant Fields
Inherits all Control Definition. Key fields:
| Field | Type | Default | Description |
|---|---|---|---|
placeholder |
string | — | Placeholder text when empty |
label |
string | — | Display label |
icon |
string | — | SF Symbol shown in the field |
defaultValue |
string | — | Initial text |
style |
string | "default" |
"default", "search", "multiline" |
tint |
string | "#667eea" |
Accent color |
clearOnSubmit |
bool | false |
Clear the field after the return-key submit (for entry forms where the typed value shouldn't linger) |
hideBackground |
bool | false |
Remove glass background |
hideLabel |
bool | false |
Hide the header label |
Styles
"default"
Standard single-line text field with rounded background.
"search"
Search-style field with magnifying glass icon and clear button.
"multiline"
Expands vertically for multi-line text entry.
Example
{
"type": "textInput",
"id": "device-name",
"position": [1, 0],
"span": [1, 2],
"placeholder": "Device name",
"defaultValue": "my-device",
"icon": "tag",
"action": { "method": "meshsocket", "mode": "request", "event": "identify", "payload": { "name": "{{value}}" } }
}
Behavior
- Action fires when the user presses return/submit
- The
{{value}}placeholder is replaced with the current text content
Related
- Control Definition — Base fields
- Actions —
{{value}}substitution