Flex Direction, Wrap, and Order Utilities in AtomicKit
Set flex direction and wrap behavior in Elementor using AtomicKit’s flex-row, flex-col, flex-wrap, basis, grow, shrink, and order utilities.
Once you have a flex container, the direction utilities determine which way its children flow — left to right, top to bottom, or in reverse. Wrap utilities decide what happens when children run out of space. Together these two sets give you full control over how a layout adapts to different content amounts and screen sizes without extra container nesting.
A very common pattern is stacking items vertically on mobile and switching to a row on medium screens and up. Use the --on-* suffix to override direction at a breakpoint:
<!-- Column on mobile, row from medium breakpoint upward --><div class="flex flex-col flex-row--on-m gap-4"> <div class="basis-1-3">Sidebar</div> <div class="basis-2-3">Main content</div></div>
Reverse variants (.flex-row-reverse, .flex-col-reverse) are useful when you want the visual order to differ from the DOM order — for example, placing a call-to-action before its supporting copy in the visual layout while keeping the semantic HTML order intact for accessibility.
Use fractional basis classes to split a row into proportional columns. All fractional basis classes support the --on-* responsive suffix, making them ideal for column layouts that reflow at different breakpoints.
Fractional basis utilities work best alongside .flex-wrap and without flex-grow applied, so children don’t expand beyond their intended proportion. If you want fluid columns that fill all remaining space, combine .basis-0 with .flex-grow instead.
Order utilities let you rearrange flex children visually without changing the DOM structure — helpful for accessibility and for responsive layouts where priority order differs across screen sizes. Both classes support the --on-* responsive suffix so you can change visual order at specific breakpoints.
Class
CSS
Effect
.order-first
order: -99999
Move item to the visual start
.order-last
order: 99999
Move item to the visual end
<!-- CTA appears last in HTML but first on small screens --><div class="flex flex-col flex-row--on-m gap-4"> <div>Supporting detail</div> <div>Secondary detail</div> <div class="order-first order-last--on-m">Call to action</div></div>
Even though flex-row is the browser default, adding it explicitly makes responsive overrides clearer and avoids confusion when reading the class list later.
Pair wrap with basis
.flex-wrap alone won’t create even columns. Set a basis-* class on each child so they wrap at the right widths rather than collapsing to their content size.
Use order sparingly
Order changes only the visual sequence — screen readers and keyboard navigation still follow the DOM order. Use it for cosmetic reordering, not for meaningful content sequences.
Reverse for RTL mirroring
Reverse direction variants can substitute for RTL layout adjustments in simple cases, but for full RTL support consider using logical CSS properties in your custom styles.