Skip to content

UIContainerElement

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

A container element that can hold child UIElements.

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.

UIElement._transform


readonly children: readonly UIElement[]

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


readonly displayObject: DisplayContainer

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

UIElement.displayObject


visible: boolean

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

UIElement.visible


readonly yogaNode: Node

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

UIElement.yogaNode

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

UIElement._attachToTree


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

UIElement._detachFromTree


addElement(child): void

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

UIElement

void


optional applyLayout(): void

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

void

UIElement.applyLayout


destroy(): void

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

void

UIElement.destroy


insertElementBefore(child, before): void

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

UIElement

UIElement

void


removeElement(child): void

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

UIElement

void


update(props): void

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

Record<string, unknown>

void

UIElement.update

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.