abcdefghijklmnopqrstuvwxyz
1234567890(,.;:?!$&*)
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.
This page describes the typography basics of the design system.
If you want to know how to adjust font-families, font-sizes, etc. in your code,
please visit our text utilities docs.
The main font family is "Swiss Post Sans".
It is available in three different font weights: black, bold and regular.
If you cannot use the design system but need the fonts, you can integrate them into your project as follows:
@font-face { font-family: 'Swiss Post Sans'; font-weight: 900; font-display: swap; src: url('https://fonts.post.ch/swiss-post-sans/v1/SwissPostSans-Black.woff2') format('woff2'); } @font-face { font-family: 'Swiss Post Sans'; font-weight: 700; font-display: swap; src: url('https://fonts.post.ch/swiss-post-sans/v1/SwissPostSans-Bold.woff2') format('woff2'); } @font-face { font-family: 'Swiss Post Sans'; font-weight: 400; font-display: swap; src: url('https://fonts.post.ch/swiss-post-sans/v1/SwissPostSans-Regular.woff2') format('woff2'); }
The CSS file including these @font-face definitions is available on our CDN under the following URL:
https://fonts.post.ch/swiss-post-sans/v1/swiss-post-sans.css
The default font size is 16px
. This corresponds to the CSS value of 1rem
. Users are able to change the default font size in their browser. By using rem
, the font-sizes scale nicely with the user defined value.
The line height depends on the font size and is specified with a multiplying factor. This multiplication factor decreases as the font size increases.
Font sizes variants are available in the text utilities.
The following sections show what specific elements look like.
Tag | Visual |
---|---|
<h1></h1> | h1 Heading |
<h2></h2> | h2 Heading |
<h3></h3> | h3 Heading |
<h4></h4> | h4 Heading |
<h5></h5> | h5 Heading |
<h6></h6> | h6 Heading |
Sometimes the document heading structure requires you
to use a heading tag that should look like another in order to maintain a consistency.
In those cases you can use the heading helper classes .h1
through .h6
.
For more details, check out heading docs.
Tag | Visual |
---|---|
<p></p> | This is a sample paragraph showing how text will appear in your application. It demonstrates the font style, size, and spacing that will be used throughout your content. Another paragraph follows to illustrate how multiple paragraphs will look. Notice the spacing between paragraphs and how the text flows naturally from one line to the next. |
<p class="lead"></p> | This is a lead paragraph that stands out from regular text, typically used for introductory content. |
Tag | Visual |
---|---|
<a></a> | |
<p> | This paragraph contains an inline clickable link that demonstrates how hyperlinks will appear within body text. |
Tag | Visual |
---|---|
<small></small> | This text contains small inline text for fine print or disclaimers. |
<strong></strong> | This text shows strong emphasis for important words or phrases. |
<em></em> | This text shows emphasis through italics for subtle highlighting. |
<sub></sub> | This text contains subscript text for chemical formulas or footnotes. |
<sup></sup> | This text contains superscript text for exponents or references. |
<mark></mark> | This text highlights important information for visual scanning. |
<abbr></abbr> | This text contains an abbr element for shortened forms. |
<code></code> | This text shows |
<kbd></kbd> | Press Ctrl + C to copy text to clipboard. |
<del></del> | This shows |
Tag | Visual |
---|---|
Unordered Lists <ul> |
|
Ordered Lists <ol> |
|
Description Lists (inline) <dl> |
|
Description Lists (grid) <dl class="row"> |
|
For more details on how to change the look of lists,
visit our list utilities docs.