Module 06 of 12

Design Tokens

Lessons

About This Module

Colors, type sizes and spacing values only become a system when everyone uses the same ones. Design tokens are how design systems store those decisions: named values such as color-text-danger or space-md that live in one place and flow into design files, websites and native apps. Change a token once, and every product that uses it updates with it.

This module starts with where design tokens came from at Salesforce, then explains how tokens are organized into primitive, semantic and component layers so that each name says what a value is for. Next, you'll see how tokens show up on the web as CSS custom properties, and finally how a build tool like Style Dictionary turns a single set of tokens into code for every platform.

Watch the lessons in order, then continue on to Component Design.

Lessons

4 videos
01

Using Design Tokens with the Lightning Design System

Jina Anne and Jon Levine, who introduced the idea of design tokens, explain how Salesforce used them to keep the Lightning Design System consistent across platforms.

02

Primitive and Semantic Tokens

Figma walks through how tokens are layered, starting from primitive values like a raw color and building up to semantic tokens that describe where and how each value should be used.

03

90 Seconds on CSS Custom Properties

Michelle Barker gives a quick introduction to CSS custom properties, the native CSS variables most web design systems use to deliver their tokens in the browser.

04

Style Dictionary Demo

The official demo of Style Dictionary, the open-source build system that takes one set of design tokens and generates styles for the web, iOS, Android and more.