Skip to content

PixiInput

Defined in: ui/src/pixi-ui/PixiInput.ts:91

Yoga-aware wrapper around @pixi/ui Input.

new PixiInput(props): PixiInput

Defined in: ui/src/pixi-ui/PixiInput.ts:95

PixiInputProps

PixiInput

PixiUIBase.constructor

readonly _transform: ElementTransform

Defined in: ui/src/UIElementBase.ts:20

Internal

UIInputCaptureElement._transform

PixiUIBase._transform


readonly displayObject: DisplayContainer

Defined in: ui/src/pixi-ui/PixiUIBase.ts:43

UIInputCaptureElement.displayObject

PixiUIBase.displayObject


protected prevProps: Record<string, unknown> = {}

Defined in: ui/src/pixi-ui/PixiUIBase.ts:46

PixiUIBase.prevProps


protected readonly view: YageInput

Defined in: ui/src/pixi-ui/PixiUIBase.ts:45

PixiUIBase.view


readonly yogaNode: Node

Defined in: ui/src/pixi-ui/PixiUIBase.ts:44

UIInputCaptureElement.yogaNode

PixiUIBase.yogaNode

get disabled(): boolean

Defined in: ui/src/pixi-ui/PixiUIBase.ts:199

Whether the widget refuses the pointer and a confirm press. Only a widget whose @pixi/ui view carries an enabled flag reports true.

boolean

PixiUIBase.disabled


get focusable(): boolean

Defined in: ui/src/pixi-ui/PixiUIBase.ts:222

Whether the widget takes part in focus navigation.

boolean

PixiUIBase.focusable


get focused(): boolean

Defined in: ui/src/pixi-ui/PixiUIBase.ts:204

Whether the widget holds focus in the scope that owns it.

boolean

PixiUIBase.focused


get protected hovered(): boolean

Defined in: ui/src/pixi-ui/PixiUIBase.ts:209

Whether the pointer is over the widget.

boolean

PixiUIBase.hovered


get protected interactive(): boolean

Defined in: ui/src/pixi-ui/PixiUIBase.ts:191

Whether the wrapped widget answers the player. One that only displays a value keeps its view’s own event mode and stays out of navigation unless focusable asks for it.

boolean

PixiUIBase.interactive


get isEditing(): boolean

Defined in: ui/src/pixi-ui/PixiInput.ts:120

Whether the field holds the caret.

boolean


get protected pressed(): boolean

Defined in: ui/src/pixi-ui/PixiUIBase.ts:217

Whether any device is holding the widget down: the pointer, a confirm press from a focus scope, or both.

boolean

PixiUIBase.pressed


get rotation(): number

Defined in: ui/src/UIElementBase.ts:50

See LayoutProps.rotation.

number

set rotation(value): void

Defined in: ui/src/UIElementBase.ts:54

number

void

PixiUIBase.rotation


get scale(): Readonly<{ x: number; y: number; }>

Defined in: ui/src/UIElementBase.ts:41

See LayoutProps.scale.

Readonly<{ x: number; y: number; }>

set scale(value): void

Defined in: ui/src/UIElementBase.ts:45

number | { x: number; y: number; }

void

PixiUIBase.scale


get transformOrigin(): Readonly<{ x: number; y: number; }>

Defined in: ui/src/UIElementBase.ts:32

See LayoutProps.transformOrigin.

Readonly<{ x: number; y: number; }>

set transformOrigin(value): void

Defined in: ui/src/UIElementBase.ts:36

number | { x: number; y: number; }

void

PixiUIBase.transformOrigin


get visible(): boolean

Defined in: ui/src/pixi-ui/PixiUIBase.ts:64

boolean

set visible(v): void

Defined in: ui/src/pixi-ui/PixiUIBase.ts:68

boolean

void

UIInputCaptureElement.visible

PixiUIBase.visible


get zIndex(): number

Defined in: ui/src/UIElementBase.ts:59

See LayoutProps.zIndex.

number

set zIndex(value): void

Defined in: ui/src/UIElementBase.ts:63

number

void

PixiUIBase.zIndex

_inspectState(): object

Defined in: ui/src/pixi-ui/PixiUIBase.ts:399

Internal

object

disabled: boolean

focusable: boolean

focused: boolean

PixiUIBase._inspectState


activate(): void

Defined in: ui/src/pixi-ui/PixiInput.ts:133

Put the caret in the field. While it holds the caret the field takes the input of the focus scope around it, so typed keys do not walk the menu. Enter commits what was typed and Escape restores the value the edit began with.

Every way of leaving the field emits its onEnter; after cancelEditing it carries the restored value.

void

PixiUIBase.activate


protected optional adjust(direction): boolean

Defined in: ui/src/pixi-ui/PixiUIBase.ts:249

Step the widget’s own value along direction, returning true only when the press was consumed. A stepper at its end returns false, so the press moves focus out of the widget.

FocusDirection

boolean

PixiUIBase.adjust


applyLayout(): void

Defined in: ui/src/pixi-ui/PixiUIBase.ts:308

void

UIInputCaptureElement.applyLayout

PixiUIBase.applyLayout


protected applyTransformProps(props): void

Defined in: ui/src/UIElementBase.ts:27

Apply the four transform props present in props. A present key holding undefined resets that prop to its default. Throws before writing anything if a value is not finite.

LayoutProps

void

PixiUIBase.applyTransformProps


protected bridgeSignal<F>(signal, key, kind, newProps): void

Defined in: ui/src/pixi-ui/PixiUIBase.ts:317

Bridge a @pixi/ui Signal to a callback prop. Only reconnects if ref changed.

F extends (…args) => void

(cb) => void

(cb) => void

string

string

Record<string, unknown>

void

PixiUIBase.bridgeSignal


cancelCapture(): void

Defined in: ui/src/pixi-ui/PixiInput.ts:151

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

void

UIInputCaptureElement.cancelCapture


cancelEditing(): void

Defined in: ui/src/pixi-ui/PixiInput.ts:143

Put back the value captured when editing began, then stop editing.

void


commitEditing(): void

Defined in: ui/src/pixi-ui/PixiInput.ts:138

Stop editing, keeping what was typed.

void


confirmCapture(): void

Defined in: ui/src/pixi-ui/PixiInput.ts:147

Stop, keeping what was typed or picked.

void

UIInputCaptureElement.confirmCapture


destroy(): void

Defined in: ui/src/pixi-ui/PixiUIBase.ts:407

void

UIInputCaptureElement.destroy

PixiUIBase.destroy


protected disconnectAll(): void

Defined in: ui/src/pixi-ui/PixiInput.ts:182

Override in subclass to disconnect all signals on destroy.

void

PixiUIBase.disconnectAll


protected disconnectBridgedSignal<F>(signal, key): void

Defined in: ui/src/pixi-ui/PixiUIBase.ts:353

F extends (…args) => void

(cb) => void

string

void

PixiUIBase.disconnectBridgedSignal


protected focusOutlineBox(): UIFocusOutlineBox

Defined in: ui/src/pixi-ui/PixiUIBase.ts:281

The rectangle the focus outline is drawn around, in this element’s own space, which is measured in layout pixels.

A widget layout sizes is outlined around both its layout box and everything it draws, so a part reaching outside the box is inside the outline. A widget that keeps its own size is outlined around what it draws. A widget whose drawn extent moves with its value overrides this with a box that holds every value, so the outline stays still.

UIFocusOutlineBox

PixiUIBase.focusOutlineBox


protected fromViewSpace(box): UIFocusOutlineBox

Defined in: ui/src/pixi-ui/PixiUIBase.ts:297

Map a rectangle from the widget view’s own space into this element’s.

UIFocusOutlineBox

UIFocusOutlineBox

PixiUIBase.fromViewSpace


protected intrinsicSize(): object

Defined in: ui/src/pixi-ui/PixiUIBase.ts:257

The size layout gives this widget when nothing constrains it. A composite that hides or reparents its parts — a dropdown lifting its open list out of this container — overrides this so the space it takes in the flow does not depend on which part is on screen.

object

height: number

width: number

PixiUIBase.intrinsicSize


protected invalidateSize(): void

Defined in: ui/src/pixi-ui/PixiUIBase.ts:373

Re-measure on the next layout pass. Yoga caches a measure function’s result, so a prop that changes the widget’s intrinsic size (its text, its item list) leaves the old size in the tree until the node is dirtied.

void

PixiUIBase.invalidateSize


releaseCapture(): void

Defined in: ui/src/pixi-ui/PixiInput.ts:156

Focus leaving the field, or its menu losing the keys, keeps the text.

void

UIInputCaptureElement.releaseCapture


protected optional setPressed(pressed): void

Defined in: ui/src/pixi-ui/PixiUIBase.ts:242

Show the widget’s pressed face while a device holds it down, and its resting face once every device has let go. A widget with no pressed face leaves it out.

true arrives again where the widget has repainted itself under a press that is still held, so an implementation sets the face and never toggles it.

boolean

void

PixiUIBase.setPressed


protected sizedByLayout(): boolean

Defined in: ui/src/pixi-ui/PixiUIBase.ts:267

Whether the size layout computes is what makes the widget that size. A composite that places its own parts (a checkbox with a label, a radio group) answers false: sizing its container would scale those parts out of shape, so it draws at its own size inside the layout box.

boolean

PixiUIBase.sizedByLayout


update(props): void

Defined in: ui/src/pixi-ui/PixiInput.ts:160

Record<string, unknown>

void

UIInputCaptureElement.update

PixiUIBase.update


protected updateBase(props): void

Defined in: ui/src/pixi-ui/PixiUIBase.ts:378

Apply layout props, visible, and store prevProps. Call at end of subclass update().

Record<string, unknown>

void

PixiUIBase.updateBase

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.