Typography
Typography establishes hierarchy, provides structure, and ensures accessible communication across applications.
Copy link to headline:Font families
The design system uses two font families to avoid visual clutter: a sans-serif and a monospace typeface. Visual contrast is achieved through variations in weight and size rather than combining multiple font families.
By default, these Open Source typefaces are used, optimized for legibility on digital screens:
- Default: Source Sans 3default
Clear, modern, and approachable. View on Google Fonts(opens in a new tab).
- Monospace: Source Code Pro
Precise and readable. Designed for data-dense layouts and code blocks. View on Google Fonts(opens in a new tab).
To support diverse brand identities, a variable-based architecture is used so font families can be customized easily. See custom font families below.
Protected content
Additional content is available for Schwarz Group employees.
Copy link to headline:Usage
Instead of arbitrary pixel values, we provide semantic text roles that express functional intent. Whenever possible, use built-in typography components for headlines, links, and text.
- Headlines
Use the OnyxHeadline component for headlines.
Heading levels
h5andh6are supported for semantic HTML hierarchy but share the visual styling ofh4.Hello World
- Levelh1
Hello World
- Levelh2
Hello World
- Levelh3
Hello World
- Levelh4
Hello World
- Levelh5
Hello World
- Levelh6
- Level
- Paragraphs
Use regular paragraph elements with the appropriate CSS class or Figma style:
Hello World
- Sizesmall
- Figma styleBody/paragraph-small
- CSS classonyx-text--small
Hello World
- Sizedefault
- Figma styleBody/paragraph-default
- CSS classnone (default)
Hello World
- Sizelarge
- Figma styleBody/paragraph-large
- CSS classonyx-text--large
- Size
- Font families
Apply monospace or default font families using the corresponding CSS utility classes or Figma styles:
Hello World
- Font familydefault
- Figma stylesee "Paragraphs" above
- CSS classsee "Paragraphs" above
Hello World
- Font familymonospace
- Figma styleMono/mono-default
- CSS classonyx-text--monospace
- Font family
- Truncation
Truncation defines how overflow text is handled when content exceeds its container width. While
multilineis standard behavior, helper classes simplify common truncation patterns.Hello World
- Truncationellipsis
- CSS classonyx-truncation-ellipsis
Hello World Hello World Hello World Hello World Hello World Hello World
- Truncationmultiline
- CSS classonyx-truncation-multiline
- Truncation
Copy link to headline:Installation
Font families are not bundled by default to optimize bundle size and build performance. You must install your chosen font packages manually, otherwise browsers fall back to system defaults.
- Install font families
We recommend installing fonts using Fontsource(opens in a new tab):
- Add imports
Import the font stylesheets in your application entry file:
Copy link to headline:Custom font families
To use custom fonts instead of the defaults:
- Install custom font families
Install your preferred font packages or host the font files locally.
- Override default font families
Override the default font variables with your custom font families: