Bolt Grid
Getting Started
CSS-Grid powered Grid component. Still in very early develpment so use with caution!
Install via NPM
npm install @bolt/components-grid
Usage
{% include "@bolt-components-grid/grid.twig" with {
vinset: "medium",
items: [
{
row_start: "1",
column_start: "1",
column_span: "12 6@medium",
content: "Grid Item 1",
attributes: {
class: [
"t-bolt-dark",
"u-bolt-padding-medium",
]
}
},
{
row_start: "2",
column_start: "7 1@small 5@medium",
column_span: "12 6@small 5@medium",
content: "Grid Item 2",
attributes: {
class: [
"t-bolt-light",
"u-bolt-padding-medium",
]
}
},
{
row_start: "3 3@small 3@medium 3@large",
column_start: "1 7@small 1@medium",
column_span: "6 12@small 4@medium",
content: "Grid Item 3",
attributes: {
class: [
"t-bolt-xdark",
"u-bolt-padding-medium",
]
}
},
{
row_start: "4 1@medium",
row_span: "1 3@medium",
column_start: "1 1@small 10@medium",
column_span: "12 12@small 3@medium",
content: "Grid Item 4",
attributes: {
class: [
"t-bolt-dark",
"u-bolt-padding-medium",
]
}
},
]
} only %}
Schema
Flexible component to build out CSS Grid-based layouts
Name | Type | Value(s) | Description | Default |
---|---|---|---|---|
attributes | object
| |
A Drupal-style attributes object with extra attributes to append to this component. |
N/A |
row_gutter | string
|
|
Specifies the row gutter size between the rows of the grid. |
none
|
vinset | string
|
|
The size of the inner space (vertical inset) that sits above / below the grid itself |
none
|
items | array
|
|
Array of content items to display inside the grid itself. |
N/A |