Class
UIFlexItem
Defines flex behavior for a GuiObject within a UIListLayout.
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#
FlexModeUIFlexMode | How the parent GuiObject grows or shrinks with available space in
the flex layout container.ReadSafe |
GrowRatiofloat | Determines the amount the parent GuiObject grows relative to other
items in the line. Applies only if FlexMode is
set to UIFlexMode.Custom.ReadSafe |
ItemLineAlignmentItemLineAlignment | Cross-axis alignment of the specific parent GuiObject within the
flex line.ReadSafe |
ShrinkRatiofloat | Determines the amount the parent GuiObject shrinks relative to
other items in the line. Applies only if
FlexMode is set to UIFlexMode.Custom.ReadSafe |
FlexMode: UIFlexMode#
ReadSafe
UIFlexMode value which defines how the parent GuiObject
grows 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.Grow sets an effective 1:0
grow‑shrink ratio on the parent GuiObject. Objects set to
UIFlexMode.Grow never 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 UIListLayout is not set to wrap
(resulting in overflow), a value of UIFlexMode.Shrink sets an
effective 0:1 grow‑shrink ratio on the parent GuiObject. Objects
set to UIFlexMode.Shrink never 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.Fill sets an effective
1:1 grow‑shrink ratio on the parent GuiObject. This setting
ensures the flex line always fills the container, even if the container
size changes.

For fine-tuned layouts, a value of UIFlexMode.Custom enables the
GrowRatio and
ShrinkRatio properties, allowing for
relative growth or shrinking of the object in a ratio compared to other
flex objects also under control of a UIFlexItem.
GrowRatio: float#
ReadSafe
If there is free space in the flex line, this property determines the
amount the parent GuiObject grows relative to other flex items in
the line. Applies only if FlexMode is set to
UIFlexMode.Custom.
ItemLineAlignment: ItemLineAlignment#
ReadSafe
Cross-axis alignment of the specific parent GuiObject within the
flex line. See UIListLayout.ItemLineAlignment for details.
ShrinkRatio: float#
ReadSafe
If there is overflow in the flex line, this property determines the amount
the parent GuiObject shrinks relative to other flex items in the
line. Applies only if FlexMode is set to
UIFlexMode.Custom.
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild