Border
Color
Css
Elevation
Surface
Focus-ring
App-header
App-side-nav
Badge-count
Badge
Form
Icon-tile
Pagination
Tabs
Tooltip
Typography
How to use tokens
Load the tokens
The tokens are CSS custom properties, declared on :root. components.css already
declares them, so if you are using the components there is nothing else to load:
<!-- components.css already declares every token; load it and they are available -->
<link rel="stylesheet" href="https://design.i80.dk/v/0.5.2/components.css">
<!-- Or the tokens on their own, if you are not using the component styles -->
<link rel="stylesheet" href="https://design.i80.dk/v/0.5.2/tokens.css">
Use tokens in your own styles
Write them into your style declarations like any other CSS variable:
.your-selector {
color: var(--i80-color-foreground-highlight);
font-family: var(--i80-typography-body-200-font-family);
font-size: var(--i80-typography-body-200-font-size);
line-height: var(--i80-typography-body-200-line-height);
background: var(--i80-color-surface-highlight);
border: 1px solid var(--i80-color-border-highlight);
}
Use a token as a colour value
Where a component takes a colour, a token is a valid value:
<i80-icon name="alert-circle" color="var(--i80-color-foreground-success)"></i80-icon>
For more details on how the design tokens pipeline is implemented, and how the design tokens are generated and distributed, see the repository @i80/design-system-tokens.