Flex Grow
Controls the growth of flex elements.
Class | Properties |
---|---|
fg-0 | flex-grow: 0; |
fg-1 | flex-grow: 1; |
fg-2 | flex-grow: 2; |
fg-3 | flex-grow: 3; |
fg-4 | flex-grow: 4; |
fg-5 | flex-grow: 5; |
fg-6 | flex-grow: 6; |
fg-7 | flex-grow: 7; |
fg-8 | flex-grow: 8; |
This example showcases various flex-grow values: 0, 1, and 2.
- The fg-0 class sets the flex-grow property to 0, preventing the item from growing.
- The fg-1 class sets the flex-grow property to 1, allowing the item to grow and fill available space equally with other items.
- Finally, fg-2 class 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>
Utilizing utilities conditionally
Override existing utilities based on the user's screen size or other factors, such as hover states. Learn more about modifiers in our documentation.
Responsive breakpoints
You can combine responsive breakpoints like sm:fg-*
,md:fg-*
, lg:fg-*
, and xxl:fg-*
allows targeting specific utilities in
different viewports.
<div class="fg-1 md:fg-2 ..."></div>
Utilizing utilities conditionally
Override existing utilities based on the user's screen size or other factors, such as hover states. Learn more about modifiers in our documentation.
Hover states
Alternatively, you can apply :hover
by using h:fg-*
utility to override elements
and change their values when hovering over them.
<div class="fg-1 h:fg-2 ..."></div>