GridLayout

[ Interface ]

interface GridLayout {
    
gridTemplateColumns?: string | null;
    
gridTemplateRows?: string | null;
    gridAutoFlow?: 'Row' | 'Column' | null;
    columnGap?: number | null;
    columnGapUnit?: DimensionUnit | null;
    rowGap?: number | null;
    rowGapUnit?: DimensionUnit | null;
    justifyItems?: 'Left' | 'Center' | 'Right' | null;
    alignItems?: 'Start' | 'Center' | 'End' | null;
    overflowX?: 'Visible' | 'Hidden' | 'Scroll' | 'Auto' | null;
    overflowY?: 'Visible' | 'Hidden' | 'Scroll' | 'Auto' | null;
}

Properties

Name

Type

Description

gridTemplateColumns

string, null, undefined

Defines the columns of the grid, e.g. "120px max-content 1fr", and thus fixes the width of the individual columns.

MDN: grid-template-columns

gridTemplateRows

string, null, undefined

Defines the rows of the grid, e.g. "120px max-content 1fr", and thus fixes the height of the individual rows.

MDN: grid-template-rows

gridAutoFlow

'Row', 'Column', Null, undefined

Determines whether automatically placed elements are arranged row by row or column by column in the grid.

MDN: grid-auto-flow

columnGap

number, null, undefined

Sets the space between columns.

MDN: column-gap

columnGapUnit

DimensionUnit, null, undefined

Specifies the unit in which the distance between the columns is specified, e.g. "px" or "%".

rowGap

number, null, undefined

Sets the space between rows.

MDN: row-gap

rowGapUnit

DimensionUnit, null, undefined

Specifies the unit in which the spacing between the lines is specified, e.g. "px" or "%".

justifyItems

'Left', 'Center', 'Right', null, undefined

Determines the horizontal alignment of the elements within their respective grid cells.

MDN: justify-items

alignItems

'Start', 'Center', 'End', null, undefined

Determines the vertical alignment of the elements within their respective grid cells.

MDN: align-items

overflowX

'Visible', 'Hidden', 'Scroll', 'Auto', null, undefined

Defines how content behaves in the event of horizontal overflow, e.g. remains visible, is cut off or is scrollable.

MDN: overflow-x

overflowY

'Visible', 'Hidden', 'Scroll', 'Auto', null, undefined

Defines how content behaves in the event of vertical overflow, e.g. remains visible, is cut off or is scrollable.

MDN: overflow-y

GridLayout 1:

Available since version 1.14.4.17