NUI / Components / Common
Image
Image displays an image resource in NUI.
Supported for registered image resources.
Overview
Image displays an image resource in NUI.
When to use
- Portraits.
- Item art.
- Icons that need image resources.
- Backgrounds.
- Other texture-backed UI elements.
Children
Does not support children.
Basic syntax
Image Portrait {
resource: PlayerPortrait
}Supported properties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
resource | resource | Yes | None | Image resource slot. |
tintColor | color | No | White | Tint applied to the image. |
fit | enum | No | stretch | Image fit mode. |
width | number | No | Auto | Desired width. |
height | number | No | Auto | Desired height. |
minWidth | number | No | Unset | Minimum width. |
minHeight | number | No | Unset | Minimum height. |
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
Image 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
Image Portrait {
resource: PlayerPortrait
tintColor: "#FFFFFFFF"
fit: contain
width: 96
height: 96
minWidth: 48
minHeight: 48
opacity: 1
layer: 1
visible: true
}Limitations
- resource must refer to a valid project image resource.
- Material-backed surfaces are planned separately.