Skip to content

UIElement

Defined in: ui/src/types.ts:214

Common interface for elements that participate in Yoga layout.

readonly optional _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.


readonly displayObject: DisplayContainer

Defined in: ui/src/types.ts:215


visible: boolean

Defined in: ui/src/types.ts:217


readonly yogaNode: Node

Defined in: ui/src/types.ts:216

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.

UITreeContext

void


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().

void


optional applyLayout(): void

Defined in: ui/src/types.ts:218

void


destroy(): void

Defined in: ui/src/types.ts:220

void


update(props): void

Defined in: ui/src/types.ts:219

Record<string, unknown>

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.