Group
Layout elements horizontally, add some space between them. This is a high-level abstraction over an horizontal flex. The container spans the whole line.
gap
: defaults to some spacing, as opposed to a regular flex. The default spacing is md, aka 16px.justify
: defaults to flex-start. (elements sit at the left)align
: defaults to center (vertically center), instead of stretch for regular flex.grow
: make children same width. It calculates the tentative equal width by dividing the remaining space by the number of items. It uses this tentative width a max-width for each children. Then, it sets flex-grow: 1 on each of them. If there was no limit, the bigger items would still be be bigger than the other even after the growing process, because each child would receive an equal share of the remaining space. Defaults to false. Also activates mono-line.wrap
: pick between mono-line (nowrap) or multi-line flex (wrap) and set the flex-wrap property with it. Mantine default to multi-line (wrap) whereas a flex-div defaults to nowrap.
The subtle differences with a regular flex may not be worth it. The main point could be the use of grow
to make children of equal width.