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.
Extended by
Section titled “Extended by”UITextPropsUISplitTextPropsUIButtonPropsUIImagePropsUINineSlicePropsUIProgressBarPropsUICheckboxPropsUIPanelPropsUIScrollViewPropsPixiFancyButtonPropsPixiCheckboxPropsPixiProgressBarPropsPixiSliderPropsPixiInputPropsPixiSelectPropsPixiRadioGroupProps
Properties
Section titled “Properties”focusable?
Section titled “focusable?”
optionalfocusable?: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.
focusId?
Section titled “focusId?”
optionalfocusId?: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.
focusNeighbors?
Section titled “focusNeighbors?”
optionalfocusNeighbors?:FocusNeighbors
Defined in: ui/src/types.ts:384
Per-direction overrides of the position rule.
focusStyle?
Section titled “focusStyle?”
optionalfocusStyle?: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.
onAdjust?
Section titled “onAdjust?”
optionalonAdjust?: (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.
Parameters
Section titled “Parameters”direction
Section titled “direction”-1 | 1
Returns
Section titled “Returns”void
onFocusChange?
Section titled “onFocusChange?”
optionalonFocusChange?: (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.
Parameters
Section titled “Parameters”focused
Section titled “focused”boolean
Returns
Section titled “Returns”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.