Flex
The Flex widget can be used as an alternative to Row and Column. It allows you to dynamically set the layout axis (horizontal or vertical) based on specific conditions or logic. This is especially useful for creative responsive layouts - where child elements should be horizontal when the screen is wide, and vertical when the screen is narrow.

Adding Flex Widget
To use the Flex widget, add it from the Layout Elements section of the Widget Palette, then add child widgets inside it. From the properties panel, set a condition for the Is Horizontal property. When this condition evaluates to True, the items will be laid out horizontally.
Consider an ecommerce app where recent orders are displayed vertically on mobile devices and switch to a horizontal layout on larger screens to make better use of the available space.
Here’s another example of using a Flex widget on a create account page to dynamically align the signup fields based on screen size.
Customization
When Is Horizontal property is disabled, the Flex widget behaves like a Column, and when enabled, it acts as a Row. Settings like main axis alignment, cross axis alignment, scrollability, and spacing work the same way they do for the Column and Row widgets.
Last updated on