UIPanelOptions
Defined in: ui/src/types.ts:501
Options for creating a root UIPanel (attached to an entity as a Component).
Extends
Section titled “Extends”Properties
Section titled “Properties”alignItems?
Section titled “alignItems?”
optionalalignItems?:"stretch"|"flex-start"|"center"|"flex-end"|"baseline"
Defined in: ui/src/types.ts:278
Inherited from
Section titled “Inherited from”alignSelf?
Section titled “alignSelf?”
optionalalignSelf?:"stretch"|"auto"|"flex-start"|"center"|"flex-end"|"baseline"
Defined in: ui/src/types.ts:126
Inherited from
Section titled “Inherited from”anchor?
Section titled “anchor?”
optionalanchor?:Anchor
Defined in: ui/src/types.ts:502
background?
Section titled “background?”
optionalbackground?:BackgroundOptions
Defined in: ui/src/types.ts:292
Inherited from
Section titled “Inherited from”bottom?
Section titled “bottom?”
optionalbottom?:PositionValue
Defined in: ui/src/types.ts:152
Offset from the containing block’s bottom edge — px or "<n>%" (only applies to position: "absolute").
Inherited from
Section titled “Inherited from”consumeInput?
Section titled “consumeInput?”
optionalconsumeInput?:boolean
Defined in: ui/src/types.ts:198
Inherited from
Section titled “Inherited from”direction?
Section titled “direction?”
optionaldirection?:FlexDirection
Defined in: ui/src/types.ts:275
Inherited from
Section titled “Inherited from”flexBasis?
Section titled “flexBasis?”
optionalflexBasis?:LayoutValue
Defined in: ui/src/types.ts:125
Inherited from
Section titled “Inherited from”flexGrow?
Section titled “flexGrow?”
optionalflexGrow?:number
Defined in: ui/src/types.ts:123
Inherited from
Section titled “Inherited from”flexShrink?
Section titled “flexShrink?”
optionalflexShrink?:number
Defined in: ui/src/types.ts:124
Inherited from
Section titled “Inherited from”
optionalgap?:number
Defined in: ui/src/types.ts:276
Inherited from
Section titled “Inherited from”height?
Section titled “height?”
optionalheight?:LayoutValue
Defined in: ui/src/types.ts:115
Inherited from
Section titled “Inherited from”justifyContent?
Section titled “justifyContent?”
optionaljustifyContent?:"flex-start"|"center"|"flex-end"|"space-between"|"space-around"|"space-evenly"
Defined in: ui/src/types.ts:284
Inherited from
Section titled “Inherited from”layer?
Section titled “layer?”
optionallayer?:string
Defined in: ui/src/types.ts:511
Target UI layer name on the scene’s render tree. Defaults to
UI_DEFAULT_LAYER ("ui"), which is auto-provisioned as a
screen-space layer via SceneRenderTreeKey.ensureLayer(...) on first
use. Any other explicit name must be declared on the scene’s
readonly layers or the panel throws on add.
optionalleft?:PositionValue
Defined in: ui/src/types.ts:146
Offset from the containing block’s left edge — px or "<n>%" (only applies to position: "absolute").
Inherited from
Section titled “Inherited from”margin?
Section titled “margin?”
optionalmargin?:number| {bottom?:number;left?:number;right?:number;top?:number; }
Defined in: ui/src/types.ts:120
Inherited from
Section titled “Inherited from”maxHeight?
Section titled “maxHeight?”
optionalmaxHeight?:LayoutValue
Defined in: ui/src/types.ts:119
Inherited from
Section titled “Inherited from”maxWidth?
Section titled “maxWidth?”
optionalmaxWidth?:LayoutValue
Defined in: ui/src/types.ts:117
Inherited from
Section titled “Inherited from”minHeight?
Section titled “minHeight?”
optionalminHeight?:LayoutValue
Defined in: ui/src/types.ts:118
Inherited from
Section titled “Inherited from”minWidth?
Section titled “minWidth?”
optionalminWidth?:LayoutValue
Defined in: ui/src/types.ts:116
Inherited from
Section titled “Inherited from”offset?
Section titled “offset?”
optionaloffset?:object
Defined in: ui/src/types.ts:503
x:
number
y:
number
onHover?
Section titled “onHover?”
optionalonHover?: (hovering) =>void
Defined in: ui/src/types.ts:220
Parameters
Section titled “Parameters”hovering
Section titled “hovering”boolean
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onPointerOut?
Section titled “onPointerOut?”
optionalonPointerOut?: () =>void
Defined in: ui/src/types.ts:219
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onPointerOver?
Section titled “onPointerOver?”
optionalonPointerOver?: () =>void
Defined in: ui/src/types.ts:218
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”overflow?
Section titled “overflow?”
optionaloverflow?:"visible"|"hidden"
Defined in: ui/src/types.ts:291
Inherited from
Section titled “Inherited from”padding?
Section titled “padding?”
optionalpadding?:Padding
Defined in: ui/src/types.ts:277
Inherited from
Section titled “Inherited from”position?
Section titled “position?”
optionalposition?:"relative"|"absolute"
Defined in: ui/src/types.ts:144
Positioning mode for this element relative to its parent. Defaults to
"relative" — the element flows in the parent’s flex layout. Set to
"absolute" to lift the element out of the flow and pin it via
left / top / right / bottom against the parent’s content box.
A position: "relative" ancestor acts as the containing block for any
absolute-positioned descendants — useful for HUD overlays, modal
backdrops, and badge markers. See <ZStack> in @yagejs/ui-react for
an opinionated overlay primitive.
Inherited from
Section titled “Inherited from”positioning?
Section titled “positioning?”
optionalpositioning?:UIPositioning
Defined in: ui/src/types.ts:527
How the panel’s root container is positioned each frame.
"anchor"(default) — resolveanchoragainst the viewport (virtualSize). Classic HUD/menu behavior."transform"— readentity.get(Transform).worldPositionand reinterpretanchoras the pivot on the panel itself (e.g.BottomCenter→ panel’s bottom-center sits at the Transform). Requires aTransformon the entity. The panel is positioned in the layer’s local coords, so this plays with any layer type: screen-space layers (paired with aScreenFollowcomponent that writes projected screen coords) for constant-size billboards, or world-space layers for genuinely diegetic UI that scales with the camera.
right?
Section titled “right?”
optionalright?:PositionValue
Defined in: ui/src/types.ts:150
Offset from the containing block’s right edge — px or "<n>%" (only applies to position: "absolute").
Inherited from
Section titled “Inherited from”
optionaltop?:PositionValue
Defined in: ui/src/types.ts:148
Offset from the containing block’s top edge — px or "<n>%" (only applies to position: "absolute").
Inherited from
Section titled “Inherited from”visible?
Section titled “visible?”
optionalvisible?:boolean
Defined in: ui/src/types.ts:153
Inherited from
Section titled “Inherited from”width?
Section titled “width?”
optionalwidth?:LayoutValue
Defined in: ui/src/types.ts:114