Skip to content

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.

Draggable

Lets the pointer drag a UI node, optionally constrained to an axis.

Explained in ui/interaction.

FieldTypeDefaultNotes
enabledbooleantrue
dragThresholdnumber5
lockXbooleanfalse
lockYbooleanfalse
constraintMinunknown
constraintMaxunknown

DragStatetransient

Transient per-frame geometry of a drag in progress; the drag system rebuilds it, scene saves omit it.

Explained in ui/interaction.

FieldTypeDefaultNotes
isDraggingbooleanfalse
startWorldPosVec2(0, 0)
currentWorldPosVec2(0, 0)
deltaWorldVec2(0, 0)
totalDeltaWorldVec2(0, 0)
pointerStartWorldVec2(0, 0)

FlexContainer

Lays children out along an axis — direction, justification, alignment, wrapping and gaps.

Explained in ui/layout.

FieldTypeDefaultNotes
directionenumRow One of Row, Column, RowReverse, ColumnReverse.
wrapenumNoWrap One of NoWrap, Wrap.
justifyContentenumStart One of Start, Center, End, SpaceBetween, SpaceAround, SpaceEvenly.
alignItemsenumStretch One of Start, Center, End, Stretch.
alignContentenumStart One of Start, Center, End, Stretch, SpaceBetween, SpaceAround.
gapVec2(0, 0)
paddingPadding{"left":0,"top":0,"right":0,"bottom":0}

Focusable

Puts a widget in the keyboard focus order.

Explained in ui/interaction.

FieldTypeDefaultNotes
tabIndexnumber0
isFocusedbooleanfalse

Interactable

Makes a UI node hit-testable, so pointer events can land on it.

Explained in ui/interaction.

FieldTypeDefaultNotes
enabledbooleantrue
blockRaycastbooleantrue
raycastTargetbooleantrue

SafeArea

Insets an absolute UI node clear of notches and rounded corners.

Explained in core-concepts/screen.

FieldTypeDefaultNotes
applyTopbooleantrue
applyBottombooleantrue
applyLeftbooleantrue
applyRightbooleantrue

Text

UI text — font, size, alignment, colour, outline, shadow, rich-text markup and a localization key.

Explained in ui/text.

FieldTypeDefaultNotes
contentstringempty
i18nKeyenum (localeKeys)emptyLocalization key — when set, content is resolved from the Localization catalogs (and re-resolved on locale switch). Leave empty for plain text.
fontAsset<font>noneA font file this project ships (.ttf / .otf). Overrides Font Family when set; leave empty to use a font the host already has.
fontFamilystring"Arial"A font the HOST already has (system or page-loaded). Ignored when Font is set.
fontSizenumber24
colorColor#ffffff
alignenumLeftHorizontal 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.
verticalAlignenumTopVertical 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.
wordWrapbooleantrue
overflowenumVisibleWhat 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. One of Visible, Clip, Ellipsis.
lineHeightnumber1.2
boldbooleanfalse
italicbooleanfalse
strokeColorColor#000000
strokeWidthnumber0
shadowColorColor#000000
shadowBlurnumber0
shadowOffsetXnumber0
shadowOffsetYnumber0
richTextbooleanfalse
renderModeenumAuto One of Auto, Bitmap, Sdf.
layernumber0Draw 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.
enabledbooleantrue

TextInput

An editable text field with a caret, selection and IME support.

Explained in ui/widgets.

FieldTypeDefaultNotes
valuestringempty
placeholderstringempty
placeholderColorColor#999999
fontAsset<font>noneA font file this project ships (.ttf / .otf). Overrides Font Family when set; leave empty to use a font the host already has.
fontFamilystring"Arial"A font the HOST already has (system or page-loaded). Ignored when Font is set.
fontSizenumber16
colorColor#ffffff
backgroundColorColor#262626
paddingnumber6
maxLengthnumber0
multilinebooleanfalse
passwordbooleanfalse
readOnlybooleanfalse
focusedbooleanfalse
cursorPosnumber0
dirtybooleantrue
textAlignenumLeftWhere 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.
renderModeenumAutoGlyph 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.

FieldTypeDefaultNotes
visualunknown
textunknown
statesobjectempty
inputunknown

UIController

Shared named page state a whole subtree switches on — no bespoke per-widget state.

Explained in ui/controllers.

FieldTypeDefaultNotes
controllersarrayempty

UIDialog

A modal dialog surface — backdrop, result, and open/close state.

Explained in ui/widgets.

FieldTypeDefaultNotes
closeOnEscapebooleantrue
closeOnBackdropbooleantrue

UIDropdown

A dropdown selector: its options and the selected index.

Explained in ui/widgets.

FieldTypeDefaultNotes
optionsarrayempty
selectedIndexnumber0
optionHeightnumber32
labelEntitynone

UIGear

Per-page field values a controller drives declaratively, authored from the Details panel.

Explained in ui/controllers.

FieldTypeDefaultNotes
bindingsarrayempty

UIInteractiontransient

Live pointer state for an interactable node — hovered, pressed, and the frame's transitions.

Explained in ui/interaction.

FieldTypeDefaultNotes
hoveredbooleanfalse
pressedbooleanfalse
justPressedbooleanfalse
justReleasedbooleanfalse

UIMask

Clips descendants to this node's rect, with an optional alpha cutoff.

Explained in ui/lists.

FieldTypeDefaultNotes
enabledbooleantrue
modeenumScissor One of Scissor, Stencil.
alphaCutoffnumber0Stencil 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.

FieldTypeDefaultNotes
positionenumRelative One of Relative, Absolute.
displayenumFlexNone removes this node and its whole subtree from layout, rendering and input. One of Flex, None.
opacitynumber1Subtree opacity, multiplied down the tree. Fades this node and everything under it. Range 0–1.
pointerEventsenumAutoNone makes this node and its subtree transparent to the pointer — hits pass through to what is behind. One of Auto, None.
widthDimension{"value":0,"unit":2}
heightDimension{"value":0,"unit":2}
minWidthDimension{"value":0,"unit":2}
minHeightDimension{"value":0,"unit":2}
maxWidthDimension{"value":0,"unit":2}
maxHeightDimension{"value":0,"unit":2}
flexGrownumber0
flexShrinknumber1
flexBasisDimension{"value":0,"unit":2}
alignSelfenumAuto One of Auto, Start, Center, End, Stretch.
marginLeftDimension{"value":0,"unit":0}
marginTopDimension{"value":0,"unit":0}
marginRightDimension{"value":0,"unit":0}
marginBottomDimension{"value":0,"unit":0}
insetLeftDimension{"value":0,"unit":2}
insetTopDimension{"value":0,"unit":2}
insetRightDimension{"value":0,"unit":2}
insetBottomDimension{"value":0,"unit":2}

UIScroll

Scrollable content inside a clipped viewport, with momentum and scrollbars.

Explained in ui/overview.

FieldTypeDefaultNotes
enabledbooleantrue
contentEntitynoneThe child that scrolls inside this node. Leave empty to use the first child.
horizontalbooleanfalse
verticalbooleantrue
movementenumClampedClamped stops at the ends; Elastic overshoots and springs back. One of Clamped, Elastic.
wheelSpeednumber1 Range ≥ 0.
dragScrollbooleantrue
decelerationRatenumber0.135Fraction 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.

FieldTypeDefaultNotes
minnumber0
maxnumber1
stepnumber0
valuenumber0
fillEntitynone
handleEntitynone

UIToggle

A two-state widget — checkbox or switch — and its group membership.

Explained in ui/widgets.

FieldTypeDefaultNotes
isOnbooleanfalse
checkEntitynone

UIVisual

What a UI node actually paints — a colour, a texture, or a nine-sliced sprite.

Explained in ui/overview.

FieldTypeDefaultNotes
visualTypeenumNone One of None, SolidColor, Image, NineSlice, Tiled, Filled.
textureAsset<texture>none
colorColor#ffffff
fitenumFillHow the image fits its box: Fill stretches, Contain letterboxes it whole, Cover fills and crops. One of Fill, Contain, Cover.
uvOffsetVec2(0, 0)
uvScaleVec2(1, 1)
sliceBorderVec4(0, 0, 0, 0)
tileSizeVec2(32, 32)
fillMethodenumHorizontal One of Horizontal, Vertical, Radial360, Radial90, Radial180.
fillOriginenumLeft One of Left, Right, Bottom, Top.
fillAmountnumber1
materialAsset<material>none
enabledbooleantrue