NUI / Components / Input
EditableText
EditableText allows a user to edit a single line of text.
Supported as a lightweight editable text field.
Overview
EditableText allows a user to edit a single line of text.
When to use
- Lightweight text entry where minimal field styling is enough.
Children
Does not support children.
Basic syntax
EditableText PlayerName {
text: "Player"
placeholder: "Enter name"
}Supported properties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | No | Empty | Initial text value. |
placeholder | string | No | Empty | Placeholder text. |
enabled | bool | No | true | Whether the field can be used. |
focusable | bool | No | true | Whether the field can receive focus. |
font | string | No | Project default | Field font name. |
fontSize | number | No | 14 | Text size. |
textColor | color | No | Default | Text color. |
placeholderColor | color | No | Default | Placeholder color. |
selectionColor | color | No | Default | Selection highlight color. |
caretColor | color | No | Default | Caret color. |
textAlign | enum | No | left | Horizontal text alignment. |
verticalTextAlign | enum | No | center | Vertical text alignment. |
padding | margin | No | Default | Text padding. |
width | number | No | Auto | Desired width. |
height | number | No | Auto | Desired height. |
opacity | number | No | 1 | Render opacity. |
visible | bool | No | true | Visibility flag. |
Contextual properties
Contextual property rules
EditableText may receive stack, canvas, grid, wrap, or ExpandableArea slot properties only when it is authored as a direct child of the matching parent. See section 7.
Full syntax example
EditableText PlayerName {
text: "Player"
placeholder: "Enter name"
enabled: true
focusable: true
font: "BodyFont"
fontSize: 16
textColor: "#F8FAFC"
placeholderColor: "#94A3B8"
selectionColor: "#2563EB"
caretColor: "#FFFFFF"
textAlign: left
verticalTextAlign: center
padding: margin(6, 8, 6, 8)
width: 240
height: 36
opacity: 1
visible: true
}Limitations
- Current public docs should treat this as a single-line field.
- Multiline text editing is planned separately.