UI components
Every field below is derived from the engine’s own component registry — the same one the editor’s Details panel reads — so the types and defaults here are the values you get when you add the component, and they cannot drift from the code. The prose that explains how to use each one lives in the guides linked per entry.
CanvasEffect
Draws the screen UI of its Canvas's sorting layer into a picture of its own and lays it on the frame through a material: a lens, scan lines, a glow over a whole HUD.
Explained in ui/overview.
| Field | Type | Default | Notes |
|---|---|---|---|
material | Asset<material> | none | A material with a PostProcess shader. The screen UI on this Canvas's sorting layer is drawn into a picture of its own, and this material lays that picture (u_texture, colour weighted by its alpha) on the frame. |
ContentRect
The rectangle world content occupies — a size and the pivot the transform sits on — that its sprite, text and clip mask follow.
Explained in ui/overview.
| Field | Type | Default | Notes |
|---|---|---|---|
size | Vec2 | (100, 100) | Width and height of the content in local units (before scale). Range ≥ 0. |
pivot | Vec2 | (0.5, 0.5) | The point of the rectangle the entity sits on, as a fraction of its size (0.5,0.5 = centre). Rotation and scale turn about it. |
Draggable
Lets the pointer drag a UI node, optionally constrained to an axis.
Explained in ui/interaction.
| Field | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | true | Whether this entity can be dragged at all. |
dragThreshold | number | 5 | Pointer travel before a press becomes a drag. Range ≥ 0. |
lockX | boolean | false | Pin the X axis; the drag only moves in Y. |
lockY | boolean | false | Pin the Y axis; the drag only moves in X. |
constrainMin | boolean | false | Apply the lower bound below. |
constraintMin | Vec2 | (0, 0) | Lowest world position the drag may reach. |
constrainMax | boolean | false | Apply the upper bound below. |
constraintMax | Vec2 | (0, 0) | Highest world position the drag may reach. |
DragStatetransient
Transient per-frame geometry of a drag in progress; the drag system rebuilds it, scene saves omit it.
Explained in ui/interaction.
| Field | Type | Default | Notes |
|---|---|---|---|
isDragging | boolean | false | |
startWorldPos | Vec2 | (0, 0) | |
currentWorldPos | Vec2 | (0, 0) | |
deltaWorld | Vec2 | (0, 0) | |
totalDeltaWorld | Vec2 | (0, 0) | |
pointerStartWorld | Vec2 | (0, 0) |
FlexContainer
Lays children out along an axis — direction, justification, alignment, wrapping and gaps.
Explained in ui/layout.
| Field | Type | Default | Notes |
|---|---|---|---|
direction | enum | Row | One of Row, Column, RowReverse, ColumnReverse. |
wrap | enum | NoWrap | One of NoWrap, Wrap. |
justifyContent | enum | Start | One of Start, Center, End, SpaceBetween, SpaceAround, SpaceEvenly. |
alignItems | enum | Stretch | One of Start, Center, End, Stretch. |
alignContent | enum | Start | One of Start, Center, End, Stretch, SpaceBetween, SpaceAround. |
gap | Vec2 | (0, 0) | |
padding | Padding | {"left":0,"top":0,"right":0,"bottom":0} |
Focusable
Puts a widget in the keyboard focus order.
Explained in ui/interaction.
| Field | Type | Default | Notes |
|---|---|---|---|
tabIndex | number | 0 | |
isFocused | boolean | false |
Interactable
Makes a UI node hit-testable, so pointer events can land on it.
Explained in ui/interaction.
| Field | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | true | |
blockRaycast | boolean | true | |
raycastTarget | boolean | true |
RectAnchors
Pins content placed by its transform to the edges or the centre of its parent's ContentRect, or of the screen: each axis stretched, pinned to an edge, or centred, with margins in units or as a fraction.
Explained in ui/overview.
| Field | Type | Default | Notes |
|---|---|---|---|
alignFlags | number | 0 | |
left | number | 0 | |
right | number | 0 | |
top | number | 0 | |
bottom | number | 0 | |
horizontalCenter | number | 0 | |
verticalCenter | number | 0 | |
isAbsLeft | boolean | true | |
isAbsRight | boolean | true | |
isAbsTop | boolean | true | |
isAbsBottom | boolean | true | |
isAbsHorizontalCenter | boolean | true | |
isAbsVerticalCenter | boolean | true | |
alignMode | number | 1 | |
enabled | boolean | true |
SafeArea
Insets an absolute UI node clear of notches and rounded corners.
Explained in core-concepts/screen.
| Field | Type | Default | Notes |
|---|---|---|---|
applyTop | boolean | true | |
applyBottom | boolean | true | |
applyLeft | boolean | true | |
applyRight | boolean | true | |
avoidHostMenu | boolean | false |
Text
UI text — font, size, alignment, colour, outline, shadow, rich-text markup and a localization key.
Explained in ui/text.
| Field | Type | Default | Notes |
|---|---|---|---|
content | string | empty | |
i18nKey | enum (localeKeys) | empty | Localization key — when set, content is resolved from the Localization catalogs (and re-resolved on locale switch). Leave empty for plain text. |
font | Asset<font> | none | A font file this project ships (.ttf / .otf). Overrides Font Family when set; leave empty to use a font the host already has. |
fontFamily | string | empty | A font the HOST already has (system or page-loaded). Ignored when Font is set. |
fontSize | number | 24 | |
color | Color | #ffffff | |
align | enum | Left | Horizontal alignment: within the layout box when the entity has a UINode, else it anchors the text to the entity origin (left/center/right edge). One of Left, Center, Right. |
verticalAlign | enum | Top | Vertical alignment: within the layout box when the entity has a UINode, else it anchors the text to the entity origin (top/middle/bottom). One of Top, Middle, Bottom. |
wordWrap | boolean | true | |
overflow | enum | Visible | What text too big for its box does. Needs a layout box: Clip and Ellipsis drop the lines past its height and trim a line past its width; Shrink sets the text smaller until it fits both. One of Visible, Clip, Ellipsis, Shrink, ResizeHeight. |
lineHeight | number | 1.2 | |
letterSpacing | number | 0 | Extra space after every glyph, in the same px as Font Size. Negative draws the glyphs closer. Wrapping, alignment and overflow measure with it. |
bold | boolean | false | |
italic | boolean | false | |
strokeColor | Color | #000000 | |
strokeWidth | number | 0 | |
shadowColor | Color | #000000 | |
shadowBlur | number | 0 | |
shadowOffsetX | number | 0 | |
shadowOffsetY | number | 0 | |
underline | boolean | false | Draw a line under each line of text, using the underscore of the font. |
richText | boolean | false | |
renderMode | enum | Auto | One of Auto, Bitmap, Sdf. |
layer | number | 0 | Draw layer for a text standing in the WORLD (no UINode) — read like Sprite/ShapeRenderer layer, so a label can sit in front of the content around it. Ignored inside a Canvas, where the UI render order decides. |
boxWidth | number | 0 | Layout box width for a text with no UINode (0 = no box: the origin is the box). Alignment, wrapping and overflow work inside it. A UINode, if present, decides the box instead. |
boxHeight | number | 0 | Layout box height (0 = none). Vertical alignment and Clip/Ellipsis need it. |
boxPivot | Vec2 | (0.5, 0.5) | Where the entity origin sits in the box, as a fraction from its left/bottom edge: (0.5, 0.5) is the centre, (0, 1) the top-left corner. |
enabled | boolean | true |
TextInput
An editable text field with a caret, selection and IME support.
Explained in ui/widgets.
| Field | Type | Default | Notes |
|---|---|---|---|
value | string | empty | |
placeholder | string | empty | |
placeholderI18nKey | enum (localeKeys) | empty | Translate the empty-field hint through the Localization resource. Leave empty for a literal placeholder. |
placeholderColor | Color | #999999 | |
font | Asset<font> | none | A font file this project ships (.ttf / .otf). Overrides Font Family when set; leave empty to use a font the host already has. |
fontFamily | string | empty | A font the HOST already has (system or page-loaded). Ignored when Font is set. |
fontSize | number | 16 | |
color | Color | #ffffff | |
backgroundColor | Color | #262626 | |
padding | number | 6 | |
maxLength | number | 0 | |
inputFilter | enum | None | Which characters the field accepts. Digits keeps only 0-9, whether typed or pasted, for a count or a price. One of None, Digits, Decimal, Phone. |
multiline | boolean | false | |
password | boolean | false | |
readOnly | boolean | false | |
focused | boolean | false | |
cursorPos | number | 0 | |
textAlign | enum | Left | Where the value sits in the field. A single line holds the alignment while it fits, then scrolls to follow the caret. One of Left, Center, Right. |
renderMode | enum | Auto | Glyph pipeline for the field text — Auto (hinted bitmap when unscaled, SDF once scaled), always Bitmap, or always SDF. One of Auto, Bitmap, Sdf. |
ThemeStyle
Records which theme role an entity's colours came from, so a live theme swap can repaint it.
Explained in ui/theming.
| Field | Type | Default | Notes |
|---|---|---|---|
visual | unknown | — | |
text | unknown | — | |
states | object | empty | |
input | unknown | — |
UIColorPicker
HSV/RGB/HEX and alpha editing with canonical RGBA events for UI, sprites and materials.
Explained in ui/widgets.
| Field | Type | Default | Notes |
|---|---|---|---|
color | Color | #3790e0 | |
alphaEnabled | boolean | true | |
format | enum | HSV + HEX | One of HSV + HEX, RGB + HEX. |
rememberColors | boolean | true | |
historyLimit | number | 8 | Range 0–32, step 1. |
history | array | empty | |
sv | Entity | none | |
alphaRamp | Entity | none | |
cursor | Entity | none | |
hue | Entity | none | |
alpha | Entity | none | |
fields | Entity | | |
hex | Entity | none | |
historyRoot | Entity | none | |
rememberButton | Entity | none | |
preview | Entity | none |
UIConsumesDragtransient
Transient input ownership for drag controls: enclosing lists keep wheel input but do not start a competing drag scroll.
Explained in ui/widgets.
A tag — it carries no fields.
UIController
Shared named page state a whole subtree switches on — no bespoke per-widget state.
Explained in ui/controllers.
| Field | Type | Default | Notes |
|---|---|---|---|
controllers | array | empty |
UIDialog
A modal dialog surface — backdrop, result, and open/close state.
Explained in ui/widgets.
| Field | Type | Default | Notes |
|---|---|---|---|
closeOnEscape | boolean | true | |
closeOnBackdrop | boolean | true |
UIDropdown
A dropdown selector: its options and the selected index.
Explained in ui/widgets.
| Field | Type | Default | Notes |
|---|---|---|---|
options | array | empty | |
selectedIndex | number | 0 | |
optionHeight | number | 32 | |
label | Entity | none |
UIGear
Per-page field values a controller drives declaratively, authored from the Details panel.
Explained in ui/controllers.
| Field | Type | Default | Notes |
|---|---|---|---|
bindings | array | empty |
UIInteractiontransient
Live pointer state for an interactable node — hovered, pressed, and the frame's transitions.
Explained in ui/interaction.
| Field | Type | Default | Notes |
|---|---|---|---|
hovered | boolean | false | |
pressed | boolean | false | |
justPressed | boolean | false | |
justReleased | boolean | false |
UIMask
Clips descendants to this node's rect, with an optional alpha cutoff.
Explained in ui/lists.
| Field | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | true | |
mode | enum | Scissor | One of Scissor, Stencil. |
alphaCutoff | number | 0 | Stencil only: above 0, clip to the mask sprite's shape instead of its box. |
UINode
The UI box: size, position, margins and padding in design pixels. Every UI entity has one.
Explained in ui/layout.
| Field | Type | Default | Notes |
|---|---|---|---|
position | enum | Relative | One of Relative, Absolute. |
display | enum | Flex | None removes this node and its whole subtree from layout, rendering and input. One of Flex, None. |
opacity | number | 1 | Subtree opacity, multiplied down the tree. Fades this node and everything under it. Range 0–1. |
pointerEvents | enum | Auto | None makes this node and its subtree transparent to the pointer — hits pass through to what is behind. One of Auto, None, Receive. |
width | Dimension | {"value":0,"unit":2} | |
height | Dimension | {"value":0,"unit":2} | |
minWidth | Dimension | {"value":0,"unit":2} | |
minHeight | Dimension | {"value":0,"unit":2} | |
maxWidth | Dimension | {"value":0,"unit":2} | |
maxHeight | Dimension | {"value":0,"unit":2} | |
flexGrow | number | 0 | |
flexShrink | number | 1 | |
flexBasis | Dimension | {"value":0,"unit":2} | |
alignSelf | enum | Auto | One of Auto, Start, Center, End, Stretch. |
marginLeft | Dimension | {"value":0,"unit":0} | |
marginTop | Dimension | {"value":0,"unit":0} | |
marginRight | Dimension | {"value":0,"unit":0} | |
marginBottom | Dimension | {"value":0,"unit":0} | |
insetLeft | Dimension | {"value":0,"unit":2} | |
insetTop | Dimension | {"value":0,"unit":2} | |
insetRight | Dimension | {"value":0,"unit":2} | |
insetBottom | Dimension | {"value":0,"unit":2} |
UIScroll
Scrollable content inside a clipped viewport, with momentum and scrollbars.
Explained in ui/overview.
| Field | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | true | |
content | Entity | none | The child that scrolls inside this node. Leave empty to use the first child. |
horizontal | boolean | false | |
vertical | boolean | true | |
movement | enum | Clamped | Clamped stops at the ends; Elastic overshoots and springs back. One of Clamped, Elastic. |
wheelSpeed | number | 1 | Range ≥ 0. |
dragScroll | boolean | true | |
decelerationRate | number | 0.135 | Fraction of flick velocity kept per second. 0 stops on release. Range 0–1. |
UISlider
A draggable value along a range, with an optional step.
Explained in ui/widgets.
| Field | Type | Default | Notes |
|---|---|---|---|
min | number | 0 | |
max | number | 1 | |
step | number | 0 | |
value | number | 0 | |
fill | Entity | none | |
handle | Entity | none |
UITabView
Connects an ordered ToggleGroup to content pages, with keyboard navigation.
Explained in ui/widgets.
| Field | Type | Default | Notes |
|---|---|---|---|
selectedIndex | number | 0 | Range ≥ -1, step 1. |
tabs | Entity | | |
pages | Entity | | |
labels | array | empty | |
allowSwitchOff | boolean | false | |
vertical | boolean | false | |
loopNavigation | boolean | true | |
selectOnFocus | boolean | true |
UIToggle
A two-state widget — checkbox or switch — and its group membership.
Explained in ui/widgets.
| Field | Type | Default | Notes |
|---|---|---|---|
isOn | boolean | false | |
check | Entity | none |
UIToggleGroup
Makes the toggles beneath it exclusive — a radio group or tab bar. Put it on their common ancestor.
Explained in ui/widgets.
| Field | Type | Default | Notes |
|---|---|---|---|
allowSwitchOff | boolean | false | Let a click turn the selected toggle off, leaving none selected. |
UITooltip
A themed engine tooltip with hover, focus, long press and screen-edge placement.
Explained in ui/widgets.
| Field | Type | Default | Notes |
|---|---|---|---|
content | string | "Tooltip" | |
stylePrefab | Asset<prefab> | none | |
hover | boolean | true | |
focus | boolean | true | |
longPress | boolean | true | |
hoverDelay | number | 0.5 | Range ≥ 0. |
longPressDelay | number | 0.6 | Range ≥ 0. |
side | enum | Bottom | One of Bottom, Top, Left, Right. |
gap | number | 8 | Range ≥ 0. |
avoidEdges | boolean | true | |
maxWidth | number | 240 | Range ≥ 24. |
UITreeView
Adapts project hierarchy data to a virtualized tree with stable IDs and host-owned drop requests.
Explained in ui/widgets.
| Field | Type | Default | Notes |
|---|---|---|---|
nodes | array | empty | |
expandedIds | array | empty | |
selectedIds | array | empty | |
selectionMode | enum | Single | One of None, Single, Multiple. |
rowHeight | number | 32 | Range ≥ 12, step 1. |
indent | number | 20 | Range ≥ 0, step 1. |
dragEnabled | boolean | false | |
rowPrefab | Asset<prefab> | none | |
emptyPrefab | Asset<prefab> | none |
UIVisual
What a UI node actually paints — a colour, a texture, or a nine-sliced sprite.
Explained in ui/overview.
| Field | Type | Default | Notes |
|---|---|---|---|
visualType | enum | None | One of None, SolidColor, Image, NineSlice, Tiled, Filled. |
texture | Asset<texture> | none | |
color | Color | #ffffff | |
fit | enum | Fill | How the image fits its box: Fill stretches, Contain letterboxes it whole, Cover fills and crops. One of Fill, Contain, Cover. |
uvOffset | Vec2 | (0, 0) | |
uvScale | Vec2 | (1, 1) | |
sliceBorder | Vec4 | (0, 0, 0, 0) | |
tileSize | Vec2 | (32, 32) | |
fillMethod | enum | Horizontal | One of Horizontal, Vertical, Radial360, Radial90, Radial180. |
fillOrigin | enum | Left | One of Left, Right, Bottom, Top. |
fillAmount | number | 1 | |
material | Asset<material> | none | |
enabled | boolean | true |
UIWorldAnchor
Stands a UI node over a point in the 3D world — an objective marker, a name over a head — and keeps it on the screen's edge when the point is out of view.
Explained in ui/overview.
| Field | Type | Default | Notes |
|---|---|---|---|
target | Entity | none | The entity to stand over. Empty: stand over the world point Offset. |
offset | Vec3 | (0, 0, 0) | Added to the target's position (world units): above a head, at a door. The point itself with no target. |
camera | Entity | none | The camera that looks. Empty: the camera on screen. |
clampToEdges | boolean | false | Off screen, stand at the edge in its direction instead of leaving it. |
edgeMargin | number | 24 | Range ≥ 0. |
edgeInsets | Padding | {"left":0,"top":0,"right":0,"bottom":0} | More room kept clear on each side, over Edge Margin: where the HUD keeps its own panels, so a clamped marker stays off them. |
hideWhenBehind | boolean | true | |
onScreen | boolean | false | Read-only — the engine computes it. |
behind | boolean | false | Read-only — the engine computes it. |
clamped | boolean | false | Read-only — the engine computes it. |
distance | number | 0 | Read-only — the engine computes it. |
VirtualButton
A held virtual InputMap action with independent pointer ownership and normal button appearance.
Explained in ui/widgets.
| Field | Type | Default | Notes |
|---|---|---|---|
inputId | string | "fire" | |
value | number | 1 |
VirtualJoystick
An independently captured fixed or follow joystick, feeding a named virtual InputMap axis.
Explained in ui/widgets.
| Field | Type | Default | Notes |
|---|---|---|---|
inputId | string | "move" | |
mode | enum | Fixed | One of Fixed, Follow. |
radius | number | 50 | Range ≥ 1. |
deadZone | number | 0.15 | Range 0–0.99. |
returnSpeed | number | 18 | Range ≥ 0. |
base | Entity | none | |
handle | Entity | none |