Skip to content

Flex Grow

Controls the growth of flex elements.

Utility Properties
Error: 429

This example showcases various flex-grow utilities:

  • The fg-0 flex grow utility sets the flex-grow property to 0, preventing the item from growing.
  • The fg-1 flex grow utility sets the flex-grow property to 1, allowing the item to grow and fill available space equally with other items.
  • Finally, fg-2 flex grow utility sets the flex-grow property to 2, allowing the item to grow twice as much as an item with a flex-grow value of 1.
A
B
C
<div class="d-f g-4 tc-white">
<div class="bg-indigo fg-0 p-4 rad-1">A</div>
<div class="bg-indigo fg-1 p-4 rad-1">B</div>
<div class="bg-indigo fg-2 p-4 rad-1">C</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="fg-1 md:fg-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="fg-1 h:fg-2 ..."></div>