Skip to content

Layout ​

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.

The basic unit of a column is 1, with a maximum of 24 and a minimum of 0.

Basic layout ​

Create basic grid layout using columns.

With row and col, we can easily manipulate the layout using the span attribute.

Column spacing ​

Column spacing is supported.

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

Hybrid layout ​

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

Column offset ​

You can specify column offsets.

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

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.

Responsive Layout ​

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

Row API ​

Row Attributes ​

NameDescriptionTypeDefault
guttergrid spacingnumber0
justifyhorizontal alignment of flex layout'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly'start
alignvertical alignment of flex layout'top' | 'middle' | 'bottom'—

Row Slots ​

NameDescriptionSubtags
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 | {span?: number, offset?: number, pull?: number, push?: number}—
sm≥768px Responsive columns or column props objectnumber | {span?: number, offset?: number, pull?: number, push?: number}—
md≥992px Responsive columns or column props objectnumber | {span?: number, offset?: number, pull?: number, push?: number}—
lg≥1200px Responsive columns or column props objectnumber | {span?: number, offset?: number, pull?: number, push?: number}—
xl≥1920px Responsive columns or column props objectnumber | {span?: number, offset?: number, pull?: number, push?: number}—

Col Slots ​

NameDescription
defaultcustomize default content

Released under the MIT License.