Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:
This is a pre-release version and is not production ready. For new and ongoing projects, please refer to the latest Design System version.
Use our powerful mobile-first flexbox grid to build layouts of all shapes and sizes thanks to a twelve column system, 5 default responsive tiers, Sass variables and mixins, and dozens of predefined classes.
Our grid system uses a series of containers, rows, and columns to layout and align content. It’s built with flexbox and is fully responsive. Below is an example and an in-depth explanation for how the grid system comes together.
next.design-system.post.ch/?path=/docs/7240f2ef-216a-490e-9bd8-c0cef19f7b31--docs&story=Basis#7240f2ef-216a-490e-9bd8-c0cef19f7b31--basis
/?path=/story/7240f2ef-216a-490e-9bd8-c0cef19f7b31--basis&full=true
<div class="container"> <div class="row"> <div class="col">Column</div> <div class="col">Column</div> <div class="col">Column</div> </div> </div>
The above example creates three equal-width columns across all devices and viewports using our predefined grid classes. Those columns are centered in the page with the parent .container
.
next.design-system.post.ch/?path=/docs/7240f2ef-216a-490e-9bd8-c0cef19f7b31--docs&story=Single Column Only#7240f2ef-216a-490e-9bd8-c0cef19f7b31--single-column-only
/?path=/story/7240f2ef-216a-490e-9bd8-c0cef19f7b31--single-column-only&full=true
Instead, your content should go here!
Breaking it down, here’s how the grid system comes together:
min-width
media queries, meaning they affect that breakpoint and all those above it. This means you can control container and column sizing and behavior by each breakpoint..container
) center and horizontally pad your content..containers
, but use them (for example) as a wrapper for your content area:
<body> <header>...</header> <main> <div class="container">...</div> </main> <footer>...</footer> </body>
padding
(called a gutter) for controlling the space between them. This padding
is then counteracted on the rows with negative margins to ensure the content in your columns is visually aligned down the left side. Rows also support modifier classes to uniformly apply column sizing and gutter classes to change the spacing of your content..col-4
spans four). Widths are set in percentages so you always have the same relative sizing.margin
and padding
spacing. Change horizontal gutters with .gx-*
classes, vertical gutters with .gy-*
, or all gutters with .g-*
classes. .g-0
is also available to remove gutters.Utilize breakpoint-specific column classes for easy column sizing without an explicit numbered class like .col-sm-6
.
For example, here are two grid layouts that apply to every device and viewport, from the smallest to the biggest. Add any number of unit-less classes for each breakpoint you need and every column will be the same width.
next.design-system.post.ch/?path=/docs/7240f2ef-216a-490e-9bd8-c0cef19f7b31--docs&story=Equal Width#7240f2ef-216a-490e-9bd8-c0cef19f7b31--equal-width
/?path=/story/7240f2ef-216a-490e-9bd8-c0cef19f7b31--equal-width&full=true
Auto-layout for flexbox grid columns also means you can set the width of one column and have the sibling columns automatically resize around it. You may use predefined grid classes (as shown below), grid mixins, or inline widths. Note that the other columns will resize no matter the width of the center column.
next.design-system.post.ch/?path=/docs/7240f2ef-216a-490e-9bd8-c0cef19f7b31--docs&story=Setting One Column Width#7240f2ef-216a-490e-9bd8-c0cef19f7b31--setting-one-column-width
/?path=/story/7240f2ef-216a-490e-9bd8-c0cef19f7b31--setting-one-column-width&full=true
Use .col-{breakpoint}-auto
classes to size columns based on the natural width of their content.
next.design-system.post.ch/?path=/docs/7240f2ef-216a-490e-9bd8-c0cef19f7b31--docs&story=Variable Width Content#7240f2ef-216a-490e-9bd8-c0cef19f7b31--variable-width-content
/?path=/story/7240f2ef-216a-490e-9bd8-c0cef19f7b31--variable-width-content&full=true
Our grid includes 5 tiers of predefined classes for building complex responsive layouts.
For grids that are the same from the smallest of devices to the largest, use the .col
and .col-*
classes. Specify a numbered class when you need a particularly sized column.
next.design-system.post.ch/?path=/docs/7240f2ef-216a-490e-9bd8-c0cef19f7b31--docs&story=All Breakpoints#7240f2ef-216a-490e-9bd8-c0cef19f7b31--all-breakpoints
/?path=/story/7240f2ef-216a-490e-9bd8-c0cef19f7b31--all-breakpoints&full=true
Using a single set of .col-sm-*
classes, you can create a basic grid system that starts out stacked and becomes horizontal at a smaller breakpoint.
next.design-system.post.ch/?path=/docs/7240f2ef-216a-490e-9bd8-c0cef19f7b31--docs&story=Stacked To Horizontal#7240f2ef-216a-490e-9bd8-c0cef19f7b31--stacked-to-horizontal
/?path=/story/7240f2ef-216a-490e-9bd8-c0cef19f7b31--stacked-to-horizontal&full=true
Don’t want your columns to simply stack in some grid tiers? Use a combination of different classes for each tier as needed.
next.design-system.post.ch/?path=/docs/7240f2ef-216a-490e-9bd8-c0cef19f7b31--docs&story=Mix And Match#7240f2ef-216a-490e-9bd8-c0cef19f7b31--mix-and-match
/?path=/story/7240f2ef-216a-490e-9bd8-c0cef19f7b31--mix-and-match&full=true
Use the responsive .row-cols-*
classes to quickly set the number of columns that best render your content
and layout. Whereas normal .col-*
classes apply to the individual columns (e.g., .col-md-4
), the
row columns classes are set on the parent .row
as a shortcut. With .row-cols-auto
you can give the
columns their natural width.
Use these row columns classes to quickly create basic grid layouts or to control your card layouts.
next.design-system.post.ch/?path=/docs/7240f2ef-216a-490e-9bd8-c0cef19f7b31--docs&story=Row Columns#7240f2ef-216a-490e-9bd8-c0cef19f7b31--row-columns
/?path=/story/7240f2ef-216a-490e-9bd8-c0cef19f7b31--row-columns&full=true
To control the space between your columns, add either .g-*
(horizontal and vertical) .gx-*
(horizontal) or .gy-*
(vertical) classes on the element containing the .row
class.
next.design-system.post.ch/?path=/docs/7240f2ef-216a-490e-9bd8-c0cef19f7b31--docs&story=Gutters#7240f2ef-216a-490e-9bd8-c0cef19f7b31--gutters
/?path=/story/7240f2ef-216a-490e-9bd8-c0cef19f7b31--gutters&full=true
To nest your content with the default grid, add a new .row
and set of .col-*
columns within an existing .col-*
column. Nested rows should include a set of columns that add up to 12 or fewer.
Note: the style in this example is applied to the column to visually better understand nesting. However, it's recommended to apply the style on a child element of the column.
next.design-system.post.ch/?path=/docs/7240f2ef-216a-490e-9bd8-c0cef19f7b31--docs&story=Nested#7240f2ef-216a-490e-9bd8-c0cef19f7b31--nested
/?path=/story/7240f2ef-216a-490e-9bd8-c0cef19f7b31--nested&full=true