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-intranet-header

npm version

Angular only component

The intranet header is an Angular component, as such it only works within Angular projects.

The Header Angular component for internal usage.

VersionBootstrapAngularNg-Bootstrap
9.x5.318.x || 19.x || 20.x17.x || 18.x || 19.x
8.x5.318.x17.x
7.x5.316.x || 17.x15.x || 16.x
5.x5.216.x15.x
4.x5.215.x14.x
3.x4.x14.x13.x
npm install @swisspost/design-system-intranet-header
  1. In app.module.ts, import SwissPostIntranetHeaderModule and add it to the imports array property.
// Other imports .... import { SwissPostIntranetHeaderModule } from '@swisspost/design-system-intranet-header'; @NgModule({ imports: [SwissPostIntranetHeaderModule], }) export class AppModule {}
  1. In app.component.html, create a section container and assign it the CSS classes that best suit your desired layout:
ClassCondition
layout-containerAlways
header-bigTo use the header with a navigation bar
header-smallTo use the header without a navigation bar
with-searchbarTo use the header with a search bar
  1. In the layout container, add the post-intranet-header component and configure it as needed using the properties described below.

  2. Add any other content in the container below the header, wrapped in an element with class header-margin.