UIElement
Defined in: ui/src/types.ts:214
Common interface for elements that participate in Yoga layout.
Extended by
Section titled “Extended by”Properties
Section titled “Properties”_transform?
Section titled “_transform?”
readonlyoptional_transform?:ElementTransform
Defined in: ui/src/types.ts:227
Internal
The element’s transformOrigin, scale, rotation and zIndex. The
parent’s layout pass reads it to place the element; an element without
one is placed at its top-left corner with no pivot.
displayObject
Section titled “displayObject”
readonlydisplayObject:DisplayContainer
Defined in: ui/src/types.ts:215
visible
Section titled “visible”visible:
boolean
Defined in: ui/src/types.ts:217
yogaNode
Section titled “yogaNode”
readonlyyogaNode:Node
Defined in: ui/src/types.ts:216
Methods
Section titled “Methods”_attachToTree()?
Section titled “_attachToTree()?”
optional_attachToTree(context):void
Defined in: ui/src/types.ts:235
Internal
Take the context of the UI tree this element belongs to: the name a development warning prints, and the scene’s focus stack. Containers implement it and pass it on to their children. An element that implements neither hook gets no warning label and never hosts a focus scope.
Parameters
Section titled “Parameters”context
Section titled “context”Returns
Section titled “Returns”void
_detachFromTree()?
Section titled “_detachFromTree()?”
optional_detachFromTree():void
Defined in: ui/src/types.ts:241
Internal
Drop the tree context, unregistering any focus scope this element hosts.
Called from a container’s removeElement and from destroy().
Returns
Section titled “Returns”void
applyLayout()?
Section titled “applyLayout()?”
optionalapplyLayout():void
Defined in: ui/src/types.ts:218
Returns
Section titled “Returns”void
destroy()
Section titled “destroy()”destroy():
void
Defined in: ui/src/types.ts:220
Returns
Section titled “Returns”void
update()
Section titled “update()”update(
props):void
Defined in: ui/src/types.ts:219
Parameters
Section titled “Parameters”Record<string, unknown>
Returns
Section titled “Returns”void
Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/ui.md.