Property | Type | Required | Default | Description |
---|---|---|---|---|
theme | Any | false | - | |
as | Enum | false | - | Typing Note: prefer using .withComponent for now as it is actually type-safe. String types need to be cast to themselves to become literal types (as={'a' as 'a'}). |
In its normal form, Grid
accepts basic css-grid properties.
"Bootstrap-style" 12-columns grid is being used in the design. To achieve it you can use the GridRow
component.
The main difference with the classic Bootstrap grid is that GridRow
is a global container for your grid, not only a row (so, then the name is not really accurate but could not find better).
GridRow
, just keep adding some Grid.Col
.Grid.Col
and its gridSpan
prop is just a helper for the native css-grid grid-column
property.You can see that the grid-gap
is doing the job for you. No margin-top/bottom in the children. Your grid is consistent and your vertical flow is managed automatically.
As with every primitives, you can pass an array to the props to handle responsive (try resizing your browser):
To span (leave an empty space) between two columns, you use the native grid-column
css property: