Typography
Typography tokens are composite tokens, meaning they are made up of multiple other tokens. This allows us to create a consistent typographic scale across our products.
Guidelines
- Use the bounding box to align with the grid - The bounding box is the vertical height of the text and is defined by the line height. That value of the line height is critical to make sure text is aligned to the 8px grid of the interface.
- Use text-crop when a font looks off-centered - Some fonts, such as ABC Favorit requires a little help to look centered. In those cases, apply a text-crop to adjust the line height. These values are available as tokens and are documented below. Hopper Components already make use of these values when necessary.
- Align text using baseline - When aligning different text boxes together horizontally, use their baselines as a guide instead of their true center for a more harmonious look.
- Line length should be between 40 to 60 characters - Lines of text that are too short make the eyes strain while long lines make it hard to concentrate. As a way to give users the best reading experience, aim for lines of text between 40 to 60 characters, including spaces. If your text doesn’t fit this rule, review the content length, font size or even information hierarchy.
Tokens
Heading
Headings are used to create a hierarchy of content. They are used to help users scan and understand the content on a page.
Size | Values | Preview | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3xl |
| Aa | ||||||||||||||||||
2xl |
| Aa | ||||||||||||||||||
xl |
| Aa | ||||||||||||||||||
lg |
| Aa | ||||||||||||||||||
md |
| Aa | ||||||||||||||||||
sm |
| Aa | ||||||||||||||||||
xs |
| Aa |
Variations
Name | Value | Preview |
---|---|---|
--hop-heading-xs-medium-font-weight | 580 | Aa |
Overline
Used to introduce a headline.
Adding a text-transform of uppercase is necessary in order to render overline as intended by the Design. A letter spacing of 0.24px
is also necessary.
Values | Preview | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Aa |
Body
Body text is used to communicate the main content of a page.
Size | Values | Preview | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2xl |
| Aa | ||||||||||||
xl |
| Aa | ||||||||||||
lg |
| Aa | ||||||||||||
md |
| Aa | ||||||||||||
sm |
| Aa | ||||||||||||
xs |
| Aa |
Variations
Name | Value | Preview |
---|---|---|
--hop-body-lg-medium-font-weight | 505 | Aa |
--hop-body-lg-semibold-font-weight | 590 | Aa |
--hop-body-lg-bold-font-weight | 690 | Aa |
--hop-body-md-medium-font-weight | 505 | Aa |
--hop-body-md-semibold-font-weight | 590 | Aa |
--hop-body-md-bold-font-weight | 690 | Aa |
--hop-body-sm-medium-font-weight | 505 | Aa |
--hop-body-sm-semibold-font-weight | 590 | Aa |
--hop-body-sm-bold-font-weight | 690 | Aa |
--hop-body-xs-medium-font-weight | 505 | Aa |
--hop-body-xs-semibold-font-weight | 590 | Aa |
--hop-body-xs-bold-font-weight | 690 | Aa |
Accent
Accent text is used to highlight important information on a page.
Size | Values | Preview | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lg |
| Aa | ||||||||||||
sm |
| Aa |
- These values are meant to be used in tandem, they have been meticously crafted to trim unwanted blank space in the ABC Favorit typeface, and it's Mono variant. They have been generated using Eight Shape tool and adjusted to fit our needs. You can see how and when to use them in the text-crop section.