Skip to main content

Grid

Container properties

All component configurations support Container properties at the first level.

Component properties

NameTypeDefaultSupports Variable PatternDescription
classNamestring✔️Root div's className
styleobjectRoot div's style
colNumbernumber12Number of columns for Grid
gapnumber8The spacing between the rows and columns of Grid is equivalent to the attribute of css flex
rowGapnumberThe spacing between Grid lines is equivalent to the attribute of css flex
columnGapnumberThe spacing between Grid columns is equivalent to the attribute of css flex
justifyItemsstringThe properties equivalent to css flex
justifyContentstringThe properties equivalent to css flex
alignContentobjectThe properties equivalent to css flex

All the remaining componentsProps will be passed to the component root element (div).

Subcomponent container properties

All son components of the Gird component support an additional span attribute at the container attribute level, which determines the number of columns the son spans in a row.

NameTypeDefaultDescription
spannumber1The number of columns occupied by a child component in the colNumber of the Grid component. For example, when colNumber is equal to 12, the child component setting "span": 4 means occupying one-third of a row.

JS API

The interface obtained through formApi.getFieldApi() is as follows:

NameTypeDescription
nodeHTML ElementThe root DOM element of the component