Skip to content

Grid

Quickly and easily create layouts with the basic 24-column.

TIP

The component uses flex layout by default, no need to set type="flex" manually.

Please note that the parent container should avoid using inline related styles, which will cause the component to not fill up its width.

Basic layout

Create basic grid layout using columns. With row and col, we can easily manipulate the layout using the span attribute.

col-24
col-12
col-12
col-8
col-8
col-8
col-6
col-6
col-6
col-6
col-4
col-4
col-4
col-4
col-4
col-4

Column spacing

Column spacing is supported. Row provides gutter attribute to specify spacings between columns, and its default value is 0.

col-6
col-6
col-6
col-6

Hybrid layout

Form a more complex hybrid layout by combining the basic 1/24 columns.

col-16
col-8
col-8
col-8
col-4
col-4
col-4
col-16
col-4

Column offset

You can specify the number of column offset by setting the value of offset attribute of Col.

col-6 | offset-0
col-6 | offset-6
col-6 | offset-6
col-6 | offset-6
col-12 | offset-6

Alignment

Default use the flex layout to make flexible alignment of columns. You can define the layout of child elements by setting justify attribute with start, center, end, space-between, space-around or space-evenly.

Justify start

col-6
col-6
col-6

Justify center

col-6
col-6
col-6

Justify end

col-6
col-6
col-6

Justify space-between

col-6
col-6
col-6

Justify space-around

col-6
col-6
col-6

Responsive Layout

Taking example by Bootstrap is responsive design, five breakpoints are preset: xs, sm, md, lg and xl.

col
col
col
col

Row API

Row Attributes

NameDescriptionTypeDefault
gutterGrid spacingNumber0
justifyHorizontal alignment of flex layoutStringstart
alignVertical alignment of flex layoutStringtop
tagCustom element tagStringdiv

Row Slots

NameDescriptionType
defaultCustomize default contentCol

Col API

Col Attributes

NameDescriptionTypeDefault
spanNumber of column the grid spansNumber24
offsetNumber of spacing on the left side of the gridNumber0
pushNumber of columns that grid moves to the rightNumber0
pullNumber of columns that grid moves to the leftNumber0
xs<768px Responsive columns or column props objectNumber Object-
sm≥768px Responsive columns or column props objectNumber Object-
md≥992px Responsive columns or column props objectNumber Object-
lg≥1200px Responsive columns or column props objectNumber Object-
xl≥1920px Responsive columns or column props objectNumber Object-
tagCustom element tagStringdiv

Col Slots

NameDescriptionType
defaultCustomize default contentCol