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.
Breakpoints are widths that determine how the responsive layout behaves across device or viewport sizes.
The Swiss Post Design System includes 5 breakpoints, sometimes referred to as grid tiers, for building responsively. These breakpoints can be customized if you’re using our source Sass files.
xs <600px | sm ≥600px | md ≥780px | lg ≥1024px | xl ≥1280px | |
---|---|---|---|---|---|
Name | Extra small | Small | Medium | Large | Extra large |
Code name | xs | sm | md | lg | xl |
Class infix | none | -sm- | -md- | -lg- | -xl- |
When using our source Sass files, you have the option of using Sass variables to change the breakpoints (not recommended).
$grid-breakpoints: ( "xs": "0", "sm": "600px", "md": "780px", "lg": "1024px", "xl": "1280px" );
There are several mixins available to use in your own Sass to help with building responsive layouts.
We primarily use the following media query ranges—or breakpoints—in our source Sass files for our layout, grid system, and components.
@use '@swisspost/design-system-styles/core' as post; // No media query necessary for xs breakpoint as it's effectively @media (min-width: 0) { ... } .custom-class { display: none; } @include post.min(lg) { .custom-class { display: block; } }
We occasionally use media queries that go in the other direction.
@use '@swisspost/design-system-styles/core' as post; // No media query necessary for xs breakpoint as it's effectively @media (max-width: 0) { ... } @include post.max(lg) { .custom-class { display: none; } }
There are also media queries and mixins for targeting a single segment of screen sizes using the minimum and maximum breakpoint widths.
@use '@swisspost/design-system-styles/core' as post; @include post.only(xs) { .custom-class { display: block; } }
Similarly, media queries may span multiple breakpoint widths.
@use '@swisspost/design-system-styles/core' as post; @include post.between(sm, lg) { .custom-class { display: block; } }