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 |
sendButton |
bool | false |
Turn the field into a growing composer with a Send button (Return = newline) |
minLines |
int | 1 |
Composer starting line count |
maxLines |
int | 6 |
Composer max lines before it scrolls internally |
autocorrect |
bool | false |
Default autocorrect/caps; off ⇒ ASCII keyboard (terminal-friendly) |
autocorrectToggle |
bool | false |
Show the inline Aa toggle |
keyboard |
string | — | "ascii", "default", "url", "email", "numbers" |
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.
Composer & keyboard
Set sendButton: true to turn the field into a growing composer: it grows from minLines
up to maxLines then scrolls inside, Return inserts a newline, and a Send button
submits. Ideal for chat or command entry.
Keyboard behaviour, tuned for command entry:
autocorrectdefaults tofalse— autocorrect/autocapitalization off with an ASCII keyboard, so typed commands aren't "corrected." Settruefor prose.keyboardoverrides the keyboard type explicitly.autocorrectToggleshows an inline Aa button that flips autocorrect at runtime and reconfigures the live keyboard immediately (no refocus needed). It also appears on the above-keyboard bar.- An above-keyboard Hide button lets you dismiss the keyboard to reach the controls/tabs underneath it.
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}}" } }
}
Command composer
{
"type": "textInput",
"id": "pane-input",
"position": [7, 0],
"span": [1, 4],
"placeholder": "type a command…",
"icon": "chevron.right",
"sendButton": true,
"autocorrectToggle": true,
"autocorrect": false,
"maxLines": 6,
"action": { "method": "meshsocket", "mode": "broadcast", "event": "broadcast", "payload": { "msg_type": "command", "text": "{{value}}" } }
}
Behavior
- Default field: the action fires when the user presses return/submit
- Composer (
sendButton: true): Send submits and Return inserts a newline - The
{{value}}placeholder is replaced with the current text content
Related
- Control Definition — Base fields
- Actions —
{{value}}substitution