Use Beegrid options and classes to laying out your application, including responsive media query and many predefined layouts.
Containers
Containers are the basic layout element in Beegrid. You can choose between two types of container.
How grid works
Beeui grid use a main container, as described before, and its child component represent the columns of the grid system.
1
2
3
4
5
6
7
8
9
10
11
12
The above example define a grid with twelve equal with columns with a predefined responsive behavior. Each column has a padding (called gap) for controlling the space between them. Here’s how it work:
The container provide to define grid items behavior and the width of grid system.
The rows are defined for breakpoints. For example, if you want your grid, on a medium-sized screen, must have three columns you can define .cols-md-3 class.
The .grid-item class define only a padding of 1rem.
To make the grid responsive, there are five grid breakpoints, one for each responsive breakpoint: extra small, small, medium, large, and extra large.
Grid breakpoints
See how aspects of the BeeGrid grid system work across multiple devices.
Extra small
≥0px
Small
≥480px
Medium
≥960px
Large
≥1280px
Extra large
≥1440px
Max container width
none
640px
1024px
1280px
1440px
Class prefix
.cols-*
.cols-sm-*
.cols-md-*
.cols-lg-*
.cols-xl-*
# of columns
12
Grid gap
12px
15px
15px
15px
15px
Layout grid
You can specify columns number class on the container. For example if you want a grid with six columns for each brekpoint you can specify the class .col-{i}, where i is a number between 1 and 12.
1
2
3
4
5
6
7
8
9
10
11
12
As you can see, you don’t need to specify a “row” container and a specific class on each column item. The container define the number of columns on each container row.
Colspan
You can specify, on a column item, how many grid columns the item span. Here come an example:
1 to 3
4
5
6
7
8
9 to 10
11
12
13
14
15
16 to 18
Responsive classes
Beeui includes five tiers predefined classes for building complex responsive grids. You can define the behavior of your grids on extra small, small, medium, large and extra large devices as you see fit.
Specify all breakpoints
If you want that your grid have a different behavior for each device size, you can specify the number of columns on the container usign the col-{bp}-{i} classes, where bp is represent the breakpoint and i the number of columns.
1
2
3
4
5
6
7
8
9
10
11
12
In this example we decide to have a different behaviour for each screen size. For the extra large screen we decide to have a twelve columns system, on large six, on medium three on small 2 and, finally on extra small devices a stacked columns grid.
Rows and columns
You can define the number of rows and columns that a grid item must occupy at certain device size. For example, if we take a look at previous example, we can decide that the grid item 1 can occupy two columns and two rows on medium screen size.
1
2
3
4
5
6
7
8
9
10
11
12
Custom Grid
If yout want to build a custom grid you can use .custom-grid class and add inline CSS variables --cols-number and --gap.
1
2
3
4
5
6
7
8
9
10
Alignments
You can use alignment utility classes to align your grid item.
Horizontal
You can specify an horizontal alignment with .justify-self-* classes on an grid item.
.justify-self-start
.justify-self-center
.justify-self-end
.justify-self-center
.justify-self-center
.justify-self-start
.justify-self-stretch
.justify-self-end
Vertical
As you can align horizontally, you can align an item vertically with .align-self-* classes. As in the following example.
.align-self-start
.align-self-end
.align-self-end
Nesting
To nest your content you can specify a .grid-container, with a specific numbers of cols and, in a specific grid item, you can declare another .grid-container.