UIPanelOptions
Defined in: ui/src/types.ts:355
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:172
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:114
Inherited from
Section titled “Inherited from”anchor?
Section titled “anchor?”
optionalanchor?:Anchor
Defined in: ui/src/types.ts:356
background?
Section titled “background?”
optionalbackground?:BackgroundOptions
Defined in: ui/src/types.ts:186
Inherited from
Section titled “Inherited from”direction?
Section titled “direction?”
optionaldirection?:FlexDirection
Defined in: ui/src/types.ts:169
Inherited from
Section titled “Inherited from”flexBasis?
Section titled “flexBasis?”
optionalflexBasis?:LayoutValue
Defined in: ui/src/types.ts:113
Inherited from
Section titled “Inherited from”flexGrow?
Section titled “flexGrow?”
optionalflexGrow?:number
Defined in: ui/src/types.ts:111
Inherited from
Section titled “Inherited from”flexShrink?
Section titled “flexShrink?”
optionalflexShrink?:number
Defined in: ui/src/types.ts:112
Inherited from
Section titled “Inherited from”
optionalgap?:number
Defined in: ui/src/types.ts:170
Inherited from
Section titled “Inherited from”height?
Section titled “height?”
optionalheight?:LayoutValue
Defined in: ui/src/types.ts:103
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:178
Inherited from
Section titled “Inherited from”layer?
Section titled “layer?”
optionallayer?:string
Defined in: ui/src/types.ts:365
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.
margin?
Section titled “margin?”
optionalmargin?:number| {bottom?:number;left?:number;right?:number;top?:number; }
Defined in: ui/src/types.ts:108
Inherited from
Section titled “Inherited from”maxHeight?
Section titled “maxHeight?”
optionalmaxHeight?:LayoutValue
Defined in: ui/src/types.ts:107
Inherited from
Section titled “Inherited from”maxWidth?
Section titled “maxWidth?”
optionalmaxWidth?:LayoutValue
Defined in: ui/src/types.ts:105
Inherited from
Section titled “Inherited from”minHeight?
Section titled “minHeight?”
optionalminHeight?:LayoutValue
Defined in: ui/src/types.ts:106
Inherited from
Section titled “Inherited from”minWidth?
Section titled “minWidth?”
optionalminWidth?:LayoutValue
Defined in: ui/src/types.ts:104
Inherited from
Section titled “Inherited from”offset?
Section titled “offset?”
optionaloffset?:object
Defined in: ui/src/types.ts:357
x:
number
y:
number
overflow?
Section titled “overflow?”
optionaloverflow?:"visible"|"hidden"
Defined in: ui/src/types.ts:185
Inherited from
Section titled “Inherited from”padding?
Section titled “padding?”
optionalpadding?:Padding
Defined in: ui/src/types.ts:171
Inherited from
Section titled “Inherited from”positioning?
Section titled “positioning?”
optionalpositioning?:UIPositioning
Defined in: ui/src/types.ts:381
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.
visible?
Section titled “visible?”
optionalvisible?:boolean
Defined in: ui/src/types.ts:121
Inherited from
Section titled “Inherited from”width?
Section titled “width?”
optionalwidth?:LayoutValue
Defined in: ui/src/types.ts:102