Border
Color
Elevation
Surface
Focus-ring
App-header
App-side-nav
Form
Pagination
Side-nav
Tabs
Tooltip
Typography
How to use tokens
Use tokens in styles
Use the design tokens in your style declarations as CSS custom properties.
Use tokens in components
- Ensure you’ve imported the relevant CSS file.
// for product applications
@import "~@hashicorp/design-system-tokens/dist/products/css/tokens.css";
// for hashicorp developer platform
@import "~@hashicorp/design-system-tokens/dist/devdot/css/tokens.css";
- If a component accepts a color parameter you can use a design token too.
<Hds::Icon @name="alert-circle" @color="var(--token-color-foreground-success)" />
For more details on how the design tokens pipeline is implemented, and how the design tokens are generated and distributed, see the repository @hashicorp/design-system-tokens.