> For the complete documentation index, see [llms.txt](https://docs.overdare.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overdare.com/development/api-reference/classes/uiflexitem.md).

# UIFlexItem

UIFlexItem : `UIComponent`

## Overview

A UI component that individually specifies how this single UI element takes its share of space when the UIListLayout placed in its parent distributes leftover or insufficient space.

You can determine whether the element grows by receiving more space or shrinks by giving up space, in what ratio it shares space with its sibling elements, and where it is positioned along the cross axis within its line. For a UI element that has a UIFlexItem, the UIFlexItem settings take precedence over the default distribution of UIListLayout.

UIFlexItem is used by placing it as a child of the UI element whose space is to be distributed. If the parent has no UIListLayout, the UI element is not affected by UIFlexItem and is laid out as usual. If a UI element has multiple UIFlexItems, only the first UIFlexItem is applied.

## Properties

### FlexMode

`Enum.UIFlexMode`

Specifies whether and how the UI element takes a share of leftover or insufficient space.

When set to Custom, the GrowRatio and ShrinkRatio values are used directly as the distribution ratios. The default is None.

#### Code Samples

### GrowRatio

`number`

Specifies the ratio of the share this UI element receives when leftover space is divided among its sibling elements.

Leftover space is divided in proportion to the GrowRatio value of each element. This value is used only when FlexMode is Custom, and negative values are treated as 0. The default is 1.

#### Code Samples

### ItemLineAlignment

`Enum.ItemLineAlignment`

Specifies where this single UI element is positioned along the cross axis within its line.

When set to Automatic, it follows the ItemLineAlignment setting of UIListLayout. The default is Automatic.

#### Code Samples

### ShrinkRatio

`number`

Specifies the ratio of the share by which this UI element shrinks together with its sibling elements when space is insufficient.

The amount of shrinkage is divided in proportion to the ShrinkRatio value multiplied by the original size of the element. This value is used only when FlexMode is Custom, and negative values are treated as 0. The default is 1.

#### Code Samples

## Methods

## Events
