Loading...
Skip to main content

Grid Template examples

Idea React grid examples

Basic grid layouts to get you familiar with building within the Bootstrap grid system.

These examples use a page-local style module to distinguish the columns.

Six grid tiers

There are six tiers to the Bootstrap grid system, one for each range of devices we support. Each tier starts at a minimum viewport size and automatically applies to the larger devices unless overridden.

4 columns from xs
4 columns from xs
4 columns from xs
4 columns from sm
4 columns from sm
4 columns from sm
4 columns from md
4 columns from md
4 columns from md
4 columns from lg
4 columns from lg
4 columns from lg
4 columns from xl
4 columns from xl
4 columns from xl
4 columns from 2xl
4 columns from 2xl
4 columns from 2xl

Three equal columns

Get three equal-width columns starting at desktops and scaling to large desktops. On mobile devices, tablets and below, the columns will automatically stack.

4 columns from md
4 columns from md
4 columns from md

Three equal columns alternative

Set the number of columns on Row to create an evenly divided grid.

One of three auto-sized columns
One of three auto-sized columns
One of three auto-sized columns

Three unequal columns

Get three columns starting at desktops and scaling to large desktops of various widths. Remember, grid columns should add up to twelve for a single horizontal block. More than that, and columns start stacking no matter the viewport.

3 columns from md
6 columns from md
3 columns from md

Two columns

Get two columns starting at desktops and scaling to large desktops.

8 columns from md
4 columns from md

Full width, single column

A column defaults to full width when no responsive span is set.


Two columns with two nested columns

Per the documentation, nesting is easy—just put a row of columns within an existing column. This gives you two columns starting at desktops and scaling to large desktops, with another two (equal widths) within the larger column.

At mobile device sizes, tablets and down, these columns and their nested columns will stack.

8 columns from md

6 columns from md
6 columns from md
4 columns from md

Mixed: mobile and desktop

The grid has six responsive tiers: xs (extra small), sm (small), md (medium), lg (large), xl (extra large), and 2xl (extra extra large). Combine the matching props on Col to create flexible layouts.

Each tier scales up, so a md prop also applies at larger breakpoints unless overridden.

8 columns from md
6 from xs, 4 from md
6 from xs, 4 from md
6 from xs, 4 from md
6 from xs, 4 from md
6 columns from xs
6 columns from xs

Mixed: mobile, tablet, and desktop

6 from sm, 8 from lg
6 from xs, 4 from lg
6 from xs, 4 from sm
6 from xs, 4 from sm
6 from xs, 4 from sm

Gutters

Set horizontal gutter utilities in Row's className.

Auto-sized column with className="gx-4" on the row
Auto-sized column with className="gx-4" on the row
Auto-sized column with className="gx-4" on the row
Auto-sized column with className="gx-4" on the row
Auto-sized column with className="gx-4" on the row
Auto-sized column with className="gx-4" on the row

Set vertical gutter utilities in Row's className.

Auto-sized column with className="gy-4" on the row
Auto-sized column with className="gy-4" on the row
Auto-sized column with className="gy-4" on the row
Auto-sized column with className="gy-4" on the row
Auto-sized column with className="gy-4" on the row
Auto-sized column with className="gy-4" on the row

Set both horizontal and vertical gutter utilities in Row's className.

Auto-sized column with className="g-3" on the row
Auto-sized column with className="g-3" on the row
Auto-sized column with className="g-3" on the row
Auto-sized column with className="g-3" on the row
Auto-sized column with className="g-3" on the row
Auto-sized column with className="g-3" on the row

Containers

fluid={false}
fluid="sm"
fluid="md"
fluid="lg"
fluid="xl"
fluid="2xl"
fluid