Introduction
Design tokens are the fundamental building blocks of a design system. They represent the atomic elements of a design, such as colors, typography, spacing, and more. Design tokens allow for a more scalable, consistent, and manageable approach to designing digital products.
What are design tokens?
Design tokens are abstracted values that store visual design attributes. They help maintain consistency across different platforms and devices. For example, a color token might be defined once and used in multiple places, ensuring uniformity.
Benefits of design tokens
- Consistency: Ensures visual and thematic consistency across the website.
- Scalability: Makes it easier to scale the design by changing values in a single place.
- Maintainability: Simplifies the process of updating the design system.
- Platform Independence: Facilitates sharing a common design language across various platforms and technologies.
How to read design token names
Knowing how to read token names will help you find the right token faster when working in designs and in code.
- The attribute is the type of foundational style, such as color, elevation, or space.
- The theme indicates light or dark mode. Not all tokens have a theme.
- The role provides information about the token’s purpose.
Examples of design tokens
These examples show how design tokens work throughout the Keystone Design System.
Color tokens
- Primary, secondary, tertiary, and error colors.
- Neutral shades for text, backgrounds, borders, and other uses.
- Extended palettes, such as success, warning, focus, etc.
Learn more about color tokens.
Spacing tokens
Learn more about spacing tokens.
Typography tokens
Typography tokens ensure that text is readable and accessible on any device. They include font families, sizes, weights, line heights, and other typographic details.
Learn more in our typography guidelines.
Elevation tokens
Learn more in our elevation guidelines.