Grid
The grid creates visual consistency between layouts while allowing flexibility across a wide variety of designs. This component is based on a 12-column grid layout.
It's based on the Material UI Grid.
However, the number of columns is set to 12 for all breakpoints, as it serves most
of the use cases and simplifies the implementation.
To opt-in to the Design System directives, you can set the columns
prop to auto
.
Also, the Design System specifications are omissive about the horizontal gutters.
The HvGrid sets them to the same value as the vertical gutters, depending on the breakpoint.
It can be overridden by setting the rowSpacing
prop.
Please refer to the Layout documentation for more information on building layouts with UI Kit.
If you want to create a simple grid where items are distributed accross a
specific number of columns, checkout the
HvSimpleGrid
component.
Default grid
The example below illustrates a common grid layout where items occupy different number of columns based on the screen size.
The 12 columns
Grid using the default 12 columns. You can resize the browser to see the gutters’ size change.
Different number of columns
If you set the columns
prop to auto
, the grid will automatically adjust the number of columns based on the current breakpoint.
Resize the browser to see the number of columns change.