@swisspost/internet-header
TypeScript icon, indicating that this package has built-in type declarations

1.13.10 • Public • Published

Swiss Post Internet Header

Swiss Post Design System splash screen

The official Swiss Post Internet Header implementation, built with Stencil JS.

Documentation

The header docs are part of the storybook docs for the Design System.

Internet Header Documentation

Installation

There are two possibilities to install the header on a page.

Npm installation

Use this if your project uses a bundler or a framework like Angular, React or Vue.

npm install @swisspost/internet-header
<!-- index.html -->
<body>
  <swisspost-internet-header project="your-project-id"></swisspost-internet-header>
  ...
</body>

Lazy-loaded

// main.ts / index.js / ...
import { defineCustomElements } from '@swisspost/internet-header/loader';

defineCustomElements();

Bare component

// main.ts / index.js / ...
import '@swisspost/internet-header/dist/swisspost-internet-header/swisspost-internet-header.esm';

Basic installation

Use this if you want to use the CDN version and if you don't use a bundler or a framework. Make sure to replace {version} with the version you want to use or remove @{version} to use the latest version.

Lazy-loaded

<!DOCTYPE html>
<html>
  <body>
    <swisspost-internet-header project="your-project-id"></swisspost-internet-header>
  </body>
  <script type="module">
    import { defineCustomElements } from 'https://unpkg.com/@swisspost/internet-header@{version}/loader/index.es2017.js';

    defineCustomElements();
  </script>
</html>

Bare component

<!-- index.html -->
<head>
  <script
    async
    type="module"
    src="https://unpkg.com/@swisspost/internet-header@{version}/dist/swisspost-internet-header/swisspost-internet-header.esm.js"
  ></script>
</head>
<body>
  <swisspost-internet-header project="your-project-id"></swisspost-internet-header>
</body>

Contribute

Contributor Covenant

Considering supporting the Swiss Post Design System with your contribution? Whether you like to contribute new patterns, fix a bug, spotted a typo or have ideas for improvement - we'd love to hear from you. Learn how you can contribute to this project in the header contribution guidelines and also take a look at the general contribution guidelines.

For any questions regarding the pattern library, you can reach out on the discussions page.

In order to keep our community open and inclusive, we expect you to read and follow our Code of Conduct.

License

Software contained in this repository is published by the Swiss Post Ltd. under the Apache 2.0 License.

© 2024 Swiss Post, Ltd.

Package Sidebar

Install

npm i @swisspost/internet-header

Weekly Downloads

459

Version

1.13.10

License

Apache-2.0

Unpacked Size

6.43 MB

Total Files

356

Last publish

Collaborators

  • alizedebray
  • oliverschuerch
  • philipp_gfeller
  • swisspost-owner