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.
Extends
Section titled “Extends”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.
Inherited from
Section titled “Inherited from”displayObject
Section titled “displayObject”
readonlydisplayObject:DisplayContainer
Defined in: ui/src/types.ts:215
Inherited from
Section titled “Inherited from”visible
Section titled “visible”visible:
boolean
Defined in: ui/src/types.ts:217
Inherited from
Section titled “Inherited from”yogaNode
Section titled “yogaNode”
readonlyyogaNode:Node
Defined in: ui/src/types.ts:216
Inherited from
Section titled “Inherited from”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
Inherited from
Section titled “Inherited from”_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
Inherited from
Section titled “Inherited from”applyLayout()?
Section titled “applyLayout()?”
optionalapplyLayout():void
Defined in: ui/src/types.ts:218
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”cancelCapture()
Section titled “cancelCapture()”cancelCapture():
void
Defined in: ui/src/focus/input-capture.ts:22
Stop, putting back the value held when the element took the input.
Returns
Section titled “Returns”void
confirmCapture()
Section titled “confirmCapture()”confirmCapture():
void
Defined in: ui/src/focus/input-capture.ts:20
Stop, keeping what was typed or picked.
Returns
Section titled “Returns”void
destroy()
Section titled “destroy()”destroy():
void
Defined in: ui/src/types.ts:220
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”moveCapture()?
Section titled “moveCapture()?”
optionalmoveCapture(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.
Parameters
Section titled “Parameters”direction
Section titled “direction”Returns
Section titled “Returns”void
releaseCapture()
Section titled “releaseCapture()”releaseCapture():
void
Defined in: ui/src/focus/input-capture.ts:24
Hand the input back, ending where the element stands.
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
Inherited from
Section titled “Inherited from”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.