Flex grids
Padding and background-color are added to all EuiFlexItems on this documentation page for illustrative purposes only. If needed, you must add your own padding through additional components or classes.
EuiFlexGrid is a more rigid component, used for repeatable rows of same-width items. You can set a
columns
prop to specify anywhere between 1-4 columns. Any more would likely break on laptop screens.Responsive flex grids
EuiFlexGrid is responsive by default, stacking items vertically on smaller screens. Should you want to customize the number of items on small or large screens, apply the responsive={false}
prop and then conditionally pass a column number based on the current breakpoint.
Display customization
Align
Flex grids support vertically aligning children via the alignItems
prop. Unlike flex groups, they do not support justifyContent
, as grid columns are always evenly distributed.
Gutter sizing
The gutterSize
prop can be applied to a parent EuiFlexGrid to adjust the spacing between child EuiFlexItems.
Changing direction
Adding direction="column"
will re-orient the flex items so they display top-down then left to right.