Skip to content

Flex

Controls how flex elements grow and shrink.

Utility Properties
Error: 429

This example showcases various flex utilities:

  • The f-none flex utility sets the flex property to none, preventing the item from growing or shrinking.
  • The f-1 flex utility sets the flex property to 1 1 0%, allowing the item to grow and shrink equally with a base size of 0.
  • Finally, f-auto flex utility sets the flex property to 1 1 auto, allowing the item to grow and shrink with a base size determined by its content.
A
B
C
<div class="tc-white" id="area">
<div class="d-f g-4 h-24 w-full">
<div class="ai-c bg-indigo d-f f-none jc-c p-4 rad-1">A</div>
<div class="ai-c bg-indigo d-f f-1 jc-c p-4 rad-1">B</div>
<div class="ai-c bg-indigo d-f f-auto jc-c p-4 rad-1">C</div>
</div>
</div>

Conditional styles

Learn how to override existing utilities based on the userโ€™s screen size or other factors, such as hover states.

Media modifier

You can combine responsive breakpoints like sm:-*,md:-*, lg:-*, and xxl:-* allows targeting specific utilities in different viewports.

<div class="f-1 md:f-2 ..."></div>

Hover modifier

Alternatively, you can apply :hover by using h:-* utility to override elements and change their values when hovering over them.

<div class="f-1 h:f-2 ..."></div>