Layout Grid

Basic layout grid

Simple three-column grid with a consistent gap.

Item 1
Item 2
Item 3

Span and alignment

Column spanning and item placement using alignment and justify modifiers.

Col span 2
Justify end
Align end
Full row item

Container query example

Container query breakpoints activated with the cq modifier.

Card A
Card B
Card C
Card D

Parameters (Blade)

Key Default value Type Available values Description
Base layout-grid class with optional grid and item modifiers. string o-layout-grid | o-layout-grid--cols-{n} | o-layout-grid--gap-{n} | o-layout-grid--col-span-{n} | o-layout-grid--row-span-{n} | o-layout-grid--justify-{placement} | o-layout-grid--align-{placement} | o-layout-grid--cq -
string - The DOM id of the component.
[] array - Array containing wrapping classes array
[] array - Array containing keys and values rendered as attributes

Container Query Support

Enable container query support by adding the .o-layout-grid--cq modifier to the grid container. This is needed to use container query based modifiers.

Available Modifiers

Modifier Description Values Responsive Container Query
Enables container query support (container-type: inline-size; container-name: layout-grid;). - No No

Column and Row Span

Make grid items span multiple columns or rows using the span modifiers.

Available Modifiers

Modifier Description Values Responsive Container Query
Make an item span n columns. 1-12 Yes Yes
Make an item span n rows. 1-12 Yes Yes

Number of Columns

Set the number of columns in the layout grid.

Available Modifiers

Modifier Description Values Responsive Container Query
Set the number of columns. 1-12 Yes Yes

Order

Control the order of grid items.

Available Modifiers

Modifier Description Values Responsive Container Query
Set the order of an item. 0-24 Yes Yes

Gap

Available gap settings in the layout grid

Available Modifiers

Modifier Description Values Responsive Container Query
Set the gap between grid items. 0-24 Yes Yes
Set the row gap. 0-24 Yes Yes
Set the column gap. 0-24 Yes Yes

Justify Placement

Control horizontal alignment of grid items.

Available Modifiers

Modifier Description Values Responsive Container Query
Align an item to the start horizontally (justify-self: start). - Yes Yes
Align an item to the center horizontally (justify-self: center). - Yes Yes
Align an item to the end horizontally (justify-self: end). - Yes Yes
Stretch an item horizontally (justify-self: stretch). - Yes Yes

Align Placement

Control vertical alignment of grid items.

Available Modifiers

Modifier Description Values Responsive Container Query
Align an item to the start vertically (align-self: start). - Yes Yes
Align an item to the center vertically (align-self: center). - Yes Yes
Align an item to the end vertically (align-self: end). - Yes Yes
Stretch an item vertically (align-self: stretch). - Yes Yes

Auto Rows

Set the grid-auto-rows property for the layout grid.

Available Modifiers

Modifier Description Values Responsive Container Query
Set grid-auto-rows to auto. - Yes Yes
Set grid-auto-rows to min-content. - Yes Yes
Set grid-auto-rows to max-content. - Yes Yes
Set grid-auto-rows to 1fr (equal height rows). - Yes Yes