Use the Adaptive Flow Layout component to layout elements on an Appway Screen that implements a basic form. If your Screen mainly contains input fields, dropdowns, date pickers, buttons, labels, headers, and other such elements, the Adaptive Flow Layout is an ideal solution. It automatically lays out these elements based on screen size and device type.
The Adaptive Flow Layout consists of a parent component and three children (Element, Full-Width Element and Group).

You can change Adaptive Flow Layout configurations globally in your system by changing the extension configuration options that start with ext.workspace.adaptiveflowlayout.
Important note These configurations are explicitly not intended to create different configurations for different devices. Therefore, do not try to create two different configurations for mobile devices and desktops. Instead, they are meant to create an adequate configuration for the elements that you place inside your Adaptive Flow Layout.
Let's say your Adaptive Flow Layout contains a form for an address. Traditionally, you have two columns for this form, because the fields come in pairs of two: "first name" and "last name" belong together, as well as "street" and "number" or "ZIP" and "city". In this case, you configure the Adaptive Flow Layout to show at most two elements next to each other.
The Adaptive Flow Layout component itself is the parent component. Use it to create a new Adaptive Flow Layout. One option would be to put the Adaptive Flow Layout component into your Template, and put a Placeholder component inside it.
Tip: We strongly recommend not nesting Adaptive Flow Layout components inside each other. Doing so can cause performance problems.
The Adaptive Flow Layout Screen Component has the following configuration (Properties tab):
- Activate adaptive behaviour. If this checkbox is selected, the following properties are available:
- Max Elements Per Row: Maximum number of Adaptive Flow Layout Elements displayed horizontally. For example, if you set this property to 3, there will never be more than three elements positioned horizontally next to each other. If this field is empty, the
ext.workspace.adaptiveflowlayout.maxElementsPerRow configuration property is applied. - Target Element Pixel Width: Width (in pixels) each Adaptive Flow Layout Element should have. Since size is dynamic, elements are usually not exactly this size: if there is more space, they are wider; if there is less space and there are no elements that could be moved, elements are smaller. If this field is empty, the
ext.workspace.adaptiveflowlayout.targetElementPixelWidth configuration property is applied. - Max Element Pixel Width: Maximum width (in pixels) of each Adaptive Flow Layout Element. If this field is empty, the
ext.workspace.adaptiveflowlayout.maxElementPixelWidth configuration property is applied. - Top Label Cutoff: The label is moved above the control when an Adaptive Flow Layout Element has a number of pixels greater than the available width. If this field is empty, the
ext.workspace.adaptiveflowlayout.topLabelCutoff configuration property is applied. - Label Width Type:
- Pixels: you can set the number of pixels the label must have in the Label Width Pixels field.
- Percentage: you can set which percentage of the Adaptive Flow Layout Element width is to be taken by the label in the Label Width Pixels field.
- Auto: the label width is determined by the
ext.workspace.adaptiveflowlayout.labelWidthType configuration property.
Use this component to add elements that dynamically change their width and position based on the browser window and target system. In a typical use case, each Adaptive Flow Layout Element contains one Info Box component, which itself contains one Control (e.g. an input field).
Use this component to add elements to your layout that should always use the full width of the window (e.g. titles or text paragraphs).
Often, you have groups of elements that belong together (e.g. a person's name and last name). You can use the Adaptive Flow Layout Group component to ensure that Appway keeps these elements together, if the situation allows it.
Important note: We recommend avoiding deep nesting. While it is possible to nest groups inside groups, nesting is usually not a useful way of conveying relationships between screen elements.
Properties tab:
- Inherit All Parent Properties. If this checkbox is selected, the Adaptive Flow Layout Group inherits its parent component properties. For example, if the Adaptive Flow Layout Group is inside an Adaptive Flow Layout that has the Max Elements Per Row property set to 4, the Adaptive Flow Layout Group will also show no more than four elements next to each other.
If this checkbox is deselected, you need to configure the component properties. The following properties are then available:
- Max Elements Per Row: Maximum number of Adaptive Flow Layout Elements displayed horizontally. For example, if you set this to 3, there will never be more than three elements positioned horizontally next to each other. If this field is empty, the
ext.workspace.adaptiveflowlayout.maxElementsPerRow configuration property is applied. - Target Element Pixel Width: The Adaptive Flow Layout attempts to size each individual element to this target width (in pixels). Since size is dynamic, elements are usually not exactly this size: if there is more space, they are wider. If there is less space and no elements can be moved away to create more space, elements will be smaller. If this field is empty, the
ext.workspace.adaptiveflowlayout.targetElementPixelWidth configuration property is applied. - Max Element Pixel Width: Maximum width (in pixels) of each Adaptive Flow Layout Element. If this field is empty, the
ext.workspace.adaptiveflowlayout.maxElementPixelWidth configuration property is applied. - Top Label Cutoff: The label is moved above the control when an Adaptive Flow Layout Element has a number of pixels greater than the available width. If this field is empty, the
ext.workspace.adaptiveflowlayout.topLabelCutoff configuration property is applied. - Label Width Type:
- Pixels: you can set the number of pixels the label must have in the Label Width Pixels field.
- Percentage: you can set which percentage of the Adaptive Flow Layout Element width is to be taken by the label in the Label Width Pixels field.
- Auto: the label width is determined by the
ext.workspace.adaptiveflowlayout.labelWidthType configuration property. - Inherit: the option determining the label width for this component is the one applied to its parent component.
Layout tab:
- Group Has Layout. If this checkbox is selected, the group receives a visual layout, indicating to the user that the child components are grouped. The available layout properties are:
- Group Title: Title of the group of elements.
We recommend using the Group Title property instead on the Heading 3 Screen Component.
- Validation Expression
- Validation Message
Only the Adaptive Flow Layout Group Screen Component has an associated Style Business Object, as it is the only component with elements subject to styling. The Adaptive Flow Layout is basically used for layouting. Further styling aspects, such as sizing and spacing of form controls, are to be defined on the Info Box elements placed inside the Adaptive Flow Layout, or the form controls placed inside the Info Boxes. Please, note that the Adaptive Flow Layout configuration properties can also control the size of the form elements, e.g. the Max Element Pixel Width and the Target Element Pixel Width settings.
The style elements of the Adaptive Flow Layout Group Style Business Object are only visible to the user if the Group Has Layout property of the Adaptive Flow Layout Group Screen Component (Layout tab) is checked.
If you do not use the Adaptive Flow Layout Group Style Business Object, consider that each Adaptive Flow Layout Group Screen Component will still use legacy styles, which may result in styling inconsistencies (e.g. in background colors being slightly different).
The Adaptive Flow Layout Group Style Business Object has two possible states:
- Title: defines the title style by referring to a Heading Style Business Object (the default value is Heading 3).
- Error Box (virtual): refers to an Error Box (virtual) Style Business Object that defines the style in case of error.
- Separator Line: defines the color, thickness and style of the line that separates the title from the other fields.
An Adaptive Flow Layout Group Screen Component (child) can be nested inside another Adaptive Flow Layout Group (parent).
Consider that only one level of nesting is supported for styling: this means that all child components apply the same Flow Layout Group Style Business Object, while the parent component can have a different Flow Layout Group Style Business Object.
For complete information on how to build a basic form layout, follow the Designing Forms#1: Basic Layout with the Adaptive Flow Layout Screen Component recipe.
All relevant Adaptive Flow Layout components work as Ajax Update Areas. This means that it is possible to redraw them dynamically by setting an HTML ID, and then using an Ajax Update Area Action with the same HTML ID to re-render them on the fly.
Note: This document assumes that the nm.workspace.css.version property is set to v2 or higher. If it is set to v1, additional CSS styles may be needed to achieve the behavior described.
For more information on the Adaptive Flow Layout components, see the Screen Component section of design.appway.com.