Skip to content

UIInputCaptureElement

Defined in: ui/src/focus/input-capture.ts:18

An element a focus scope hands its input to. Confirm keeps what the element produced, cancel puts back what it replaced, and release is the scope taking its input back: focus moved away, or the scope stopped reading input.

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 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


optional applyLayout(): void

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

void

UIElement.applyLayout


cancelCapture(): void

Defined in: ui/src/focus/input-capture.ts:22

Stop, putting back the value held when the element took the input.

void


confirmCapture(): void

Defined in: ui/src/focus/input-capture.ts:20

Stop, keeping what was typed or picked.

void


destroy(): void

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

void

UIElement.destroy


optional moveCapture(direction): void

Defined in: ui/src/focus/input-capture.ts:29

Take a direction press. One the element has no use for is still consumed and never reaches the scope’s navigation.

FocusDirection

void


releaseCapture(): void

Defined in: ui/src/focus/input-capture.ts:24

Hand the input back, ending where the element stands.

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.