NUI / Components / Common
Text
Text renders a single text label in Unreal-native UI.
Supported as the current NUI Script V2 text display component.
Overview
Text renders a single text label in Unreal-native UI.
When to use
- Labels.
- Captions.
- Button-like text that is not itself interactive.
- Counters.
- Headings.
- Status text.
Children
Does not support children.
Basic syntax
Text Title {
text: "Inventory"
}Supported properties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | Yes | Empty | Text content to render. |
font | string | No | Project default | Font resource name. |
fontSize | number | No | 14 | Text size. |
color | color | No | Inherited/default | Text color. |
textAlign | enum | No | left | Horizontal text alignment. |
verticalTextAlign | enum | No | top | Vertical text alignment. |
wrap | bool | No | false | Enables text wrapping. |
letterSpacing | number | No | 0 | Additional spacing between letters. |
lineHeight | number | No | Unset | Line height override. |
width | number | No | Auto | Desired width. |
height | number | No | Auto | Desired height. |
minWidth | number | No | Unset | Minimum width. |
minHeight | number | No | Unset | Minimum height. |
maxWidth | number | No | Unset | Maximum width. |
maxHeight | number | No | Unset | Maximum height. |
x | number | No | 0 | Local X position when applicable. |
y | number | No | 0 | Local Y position when applicable. |
position | vec2 | No | vec2(0, 0) | Local position. |
horizontalAlign | enum | No | Inherited | Component horizontal alignment. |
verticalAlign | enum | No | Inherited | Component vertical alignment. |
opacity | number | No | 1 | Render opacity. |
layer | integer | No | Context default | Layer order inside layered parents. |
visible | bool | No | true | Visibility flag. |
Contextual properties
Contextual property rules
Text 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
Text StatusLabel {
text: "Ready"
font: "BodyFont"
fontSize: 18
color: "#F4F7FB"
textAlign: center
verticalTextAlign: center
wrap: true
letterSpacing: 1
lineHeight: 22
width: 220
height: 36
minWidth: 120
minHeight: 24
maxWidth: 360
maxHeight: 80
position: vec2(12, 8)
horizontalAlign: center
verticalAlign: center
opacity: 0.9
layer: 2
visible: true
}Limitations
- Use Text for plain text only.
- Rich text, decorators, inline images, and multiline editing are planned separately.