Class · inherits UIComponent
UIFlexItem
Defines flex behavior for a GuiObject within a UIListLayout.
About UIFlexItem
The UIFlexItem object defines flex behavior for its parent
GuiObject under the control of a UIListLayout. The defined
flex behavior overrides that of the controlling UIListLayout, letting
you configure flex behavior on a per‑object basis where necessary.
Properties 4
FlexMode
: UIFlexModeHow the parentGuiObjectgrows or shrinks with available space in the flex layout container.UIFlexModevalue which defines how the parentGuiObjectgrows or shrinks with available space in the flex layout container.When the container's size is larger than the flex line's combined basis size, a value of
UIFlexMode.Growsets an effective1:0grow‑shrink ratio on the parentGuiObject. Objects set toUIFlexMode.Grownever shrink below their basis size, so overflow may occur if the container becomes smaller than the line's combined basis size.When the container's size is smaller than the flex line's combined basis size and the controlling
UIListLayoutis not set to wrap (resulting in overflow), a value ofUIFlexMode.Shrinksets an effective0:1grow‑shrink ratio on the parentGuiObject. Objects set toUIFlexMode.Shrinknever grow above their basis size, so underflow may occur if the container becomes larger than the line's combined basis size.When the container's size is either larger or smaller than the flex line's combined basis size, a value of
UIFlexMode.Fillsets an effective1:1grow‑shrink ratio on the parentGuiObject. This setting ensures the flex line always fills the container, even if the container size changes.For fine-tuned layouts, a value of
UIFlexMode.Customenables theGrowRatioandShrinkRatioproperties, allowing for relative growth or shrinking of the object in a ratio compared to other flex objects also under control of aUIFlexItem.GrowRatio
: floatDetermines the amount the parentGuiObjectgrows relative to other items in the line. Applies only ifFlexModeis set toUIFlexMode.Custom.If there is free space in the flex line, this property determines the amount the parent
GuiObjectgrows relative to other flex items in the line. Applies only ifFlexModeis set toUIFlexMode.Custom.ItemLineAlignment
: ItemLineAlignmentCross-axis alignment of the specific parentGuiObjectwithin the flex line.Cross-axis alignment of the specific parent
GuiObjectwithin the flex line. SeeUIListLayout.ItemLineAlignmentfor details.ShrinkRatio
: floatDetermines the amount the parentGuiObjectshrinks relative to other items in the line. Applies only ifFlexModeis set toUIFlexMode.Custom.If there is overflow in the flex line, this property determines the amount the parent
GuiObjectshrinks relative to other flex items in the line. Applies only ifFlexModeis set toUIFlexMode.Custom.
UIFlexItem also has every member of UIComponent. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.