Dark Light
System
Default LBBW Jira Confluence Source Code
Share
Playground

Cluster #

The Flank utility in the aFP Design System helps you create flexible two-part layouts where one side “flanks” the other. It’s ideal for patterns like navigation bars, headers with actions, or layouts where one element takes up remaining space beside another.

By default, a flank container uses display: flex with wrapping enabled, a medium gap, and automatic alignment along the cross axis.


Custom Properties #

Variable Default Description
--afp-flank-size initial Defines the width (or flex-basis) of the flanking element.
--afp-flank-content-percentage initial Minimum width of the flexible content area.

Modifiers #

You can control the direction of the layout by adding class suffixes:

Variable Description
:start Flank element appears on the left (default).
:end Flank element appears on the right.

Combining Utilities #

Flank can be combined with alignment, gap, and layout utilities for more control. For example, you can use alignment classes from the aFP Design System to adjust vertical alignment or modify spacing with additional gap utilities.


Examples #

Position #

By default, the first element inside a afp-flank container acts as the flanking item. You can control which side flanks the content by adding the :start or :end modifier to the afp-flank class.


Sizing #

The width of the flank adjusts automatically based on its content, but you can define a specific size with the -afp-flank-size variable. When wrapping occurs, the flank expands to match the container’s full inline width.

The primary content area automatically occupies any remaining horizontal space within the container. By default, items will wrap once the main content becomes narrower than 50% of the container. You can adjust this threshold using the --afp-flank-content-percentage variable.

Share
Create a link with a predefined theme that is automatically applied when the generated link is opened. Default LBBW Presentation Mode
Abort Copy Link