Skip to content

FocusProps

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

Focus participation for one element, mixed into every element props interface. Every callback runs through the UI error boundary.

optional focusable?: boolean

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

Take part in focus navigation. Defaults to true for UIButton, UICheckbox and the six interactive @pixi/ui wrappers, false for everything else. false leaves the element enabled for the pointer.


optional focusId?: string

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

Name this element so a sibling’s FocusProps.focusNeighbors can point at it. Unique inside one scope: a duplicate id draws a development warning, and the first element in tree order answers to it.


optional focusNeighbors?: FocusNeighbors

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

Per-direction overrides of the position rule.


optional focusStyle?: UIFocusStyle | null

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

The focus outline for this element alone. Each field falls back to the plugin-level focusStyle, then to the built-in default. null draws no outline on this element.


optional onAdjust?: (direction) => void

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

Called with -1 for left and 1 for right while this element is focused, consuming that press. Up and down still move focus.

-1 | 1

void


optional onFocusChange?: (focused) => void

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

Called with true when focus arrives and false when it leaves, including when the scope stops taking input. Use it to show focus without an outline: a marker beside the row, a swapped sprite, a sound.

boolean

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.