No Preview

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:

  1. Missing Context/Providers: You can use decorators to supply specific contexts or providers, which are sometimes necessary for components to render correctly. For detailed instructions on using decorators, please visit the Decorators documentation.
  2. Misconfigured Webpack or Vite: Verify that Storybook picks up all necessary settings for loaders, plugins, and other relevant parameters. You can find step-by-step guides for configuring Webpack or Vite with Storybook.
  3. Missing Environment Variables: Your Storybook may require specific environment variables to function as intended. You can set up custom environment variables as outlined in the Environment Variables documentation.

@swisspost/design-system-styles

npm version

The styling package, including theming for Bootstrap and ng-bootstrap components.

VersionBootstrapAngularng-Bootstrap
9.x5.3N/A>=17.0.0 < 21.0.0
8.x5.318.x17.x
7.x5.316.x || 17.x15.x || 16.x
6.4.0 - 6.6.55.316.x15.x
6.2.0 - 6.3.05.215.x15.x
5.x5.114.x12.x
npm install @swisspost/design-system-styles

Import one of our stylesheets into your project (for example into your /src/styles.scss file).

@use '@swisspost/design-system-styles/<bundle-name>.<extension>';
<bundle-name><extension>Description
indexcss, scsseverything for internet facing applications
intranetcss, scsseverything for internal applications
basicscss, scssatomic styles for font, buttons, lists, etc. (no component styles)

Use the SCSS core for your custom styles and make sure you're always using the most up to date definitions:

NOTE: The core file itself, does not produce any CSS output. It only contains variables, functions and mixins.

@use '@swisspost/design-system-styles/core' as post; .my-component { background-color: post.$yellow; // #FFCC00 }