LayoutProps
Defined in: ui/src/types.ts:133
Common layout props every element can accept (applied to its Yoga node).
Extended by
Section titled “Extended by”UITextPropsUISplitTextPropsUIButtonPropsUIImagePropsUINineSlicePropsUIProgressBarPropsUICheckboxPropsUIPanelPropsUIScrollViewPropsPixiFancyButtonPropsPixiCheckboxPropsPixiProgressBarPropsPixiSliderPropsPixiInputPropsPixiSelectPropsPixiRadioGroupProps
Properties
Section titled “Properties”alignSelf?
Section titled “alignSelf?”
optionalalignSelf?:"auto"|"center"|"flex-start"|"flex-end"|"stretch"|"baseline"
Defined in: ui/src/types.ts:157
bottom?
Section titled “bottom?”
optionalbottom?:PositionValue
Defined in: ui/src/types.ts:183
Offset from the containing block’s bottom edge — px or "<n>%" (only applies to position: "absolute").
optionalflex?:number
Defined in: ui/src/types.ts:156
Shorthand for the common CSS flex: <number> case — expands to
flexGrow: <number>, flexShrink: 1, flexBasis: 0. Use it for a child
that should fill the remaining main-axis space (e.g. the text column
between a fixed icon and a fixed button): sizing from a 0 basis means it
won’t claim its content width and push its siblings, and its text wraps
cleanly. Prefer this over flexGrow: 1 alone, which keeps flexBasis: auto
(content width) and overflows. Explicit flexGrow/flexShrink/flexBasis
override the parts this expands to.
flexBasis?
Section titled “flexBasis?”
optionalflexBasis?:LayoutValue
Defined in: ui/src/types.ts:145
flexGrow?
Section titled “flexGrow?”
optionalflexGrow?:number
Defined in: ui/src/types.ts:143
flexShrink?
Section titled “flexShrink?”
optionalflexShrink?:number
Defined in: ui/src/types.ts:144
height?
Section titled “height?”
optionalheight?:LayoutValue
Defined in: ui/src/types.ts:135
optionalleft?:PositionValue
Defined in: ui/src/types.ts:177
Offset from the containing block’s left edge — px or "<n>%" (only applies to position: "absolute").
margin?
Section titled “margin?”
optionalmargin?:number| {bottom?:number;left?:number;right?:number;top?:number; }
Defined in: ui/src/types.ts:140
maxHeight?
Section titled “maxHeight?”
optionalmaxHeight?:LayoutValue
Defined in: ui/src/types.ts:139
maxWidth?
Section titled “maxWidth?”
optionalmaxWidth?:LayoutValue
Defined in: ui/src/types.ts:137
minHeight?
Section titled “minHeight?”
optionalminHeight?:LayoutValue
Defined in: ui/src/types.ts:138
minWidth?
Section titled “minWidth?”
optionalminWidth?:LayoutValue
Defined in: ui/src/types.ts:136
position?
Section titled “position?”
optionalposition?:"relative"|"absolute"
Defined in: ui/src/types.ts:175
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.
right?
Section titled “right?”
optionalright?:PositionValue
Defined in: ui/src/types.ts:181
Offset from the containing block’s right edge — px or "<n>%" (only applies to position: "absolute").
rotation?
Section titled “rotation?”
optionalrotation?:number
Defined in: ui/src/types.ts:199
Rotation in radians about LayoutProps.transformOrigin. Default 0.
scale?
Section titled “scale?”
optionalscale?:number| {x:number;y:number; }
Defined in: ui/src/types.ts:197
Scale about LayoutProps.transformOrigin, one number for both axes
or one per axis. Default 1. 0 and negative values are allowed.
optionaltop?:PositionValue
Defined in: ui/src/types.ts:179
Offset from the containing block’s top edge — px or "<n>%" (only applies to position: "absolute").
transformOrigin?
Section titled “transformOrigin?”
optionaltransformOrigin?:number| {x:number;y:number; }
Defined in: ui/src/types.ts:192
The point scale and rotation turn about, as fractions of the
element’s computed size: 0 is the top-left corner, 0.5 the centre,
{ x: 0.5, y: 1 } the middle of the bottom edge. Default 0. This prop,
scale, rotation and zIndex change how the element is drawn, never
its Yoga box.
visible?
Section titled “visible?”
optionalvisible?:boolean
Defined in: ui/src/types.ts:184
width?
Section titled “width?”
optionalwidth?:LayoutValue
Defined in: ui/src/types.ts:134
zIndex?
Section titled “zIndex?”
optionalzIndex?:number
Defined in: ui/src/types.ts:206
Draw and pointer order among the siblings in the same container: a
higher value draws on top and takes the pointer first. Default 0;
siblings with equal values keep the order they were added in. To rise
above an element in a neighbouring container, raise that container.
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.