Flex layout

Also known as

CSS flexbox, Flexible box, Responsive layout

FlexLayout controls the direction, size and position of items displayed in a UI container. Use when the direction needs complex customization that can't be achieved by StackLayout, FlowLayout or SplitLayout. For additional control of the size and position of content, use FlexItem for each content item inside FlexLayout.

  • When a complex layout cannot first be achieved using flow, stack and split layouts. However, if you are very familiar with CSS Flexbox, you may choose to use a flex layout from the start.
  • You want a layout that flows in a single dimension, where the dimension may change depending on other factors, such as viewport size. For example, in layouts where the direction and overflow behavior need to change depending on the viewport size or device.
  • For small-scale layout of components within a container or region within an application or webpage.
  • When a flow, stack or split layout can achieve your desired layout. These components are optimized for specific use cases in a constant direction.
  • When you need to present content over both rows and columns at the same time, such as a dashboard or multi-column Form, use GridLayout.
  • For large-scale, page-level layout. Instead, use GridLayout or BorderLayout.

To import FlexLayout and FlexItem from the core Salt package, use:

NameTypeDescriptionDefault
NameTypeDescriptionDefault