Design practice
Design Token Pipeline Project
Build a complete token pipeline from Figma to CSS custom properties
01 / Prepare
What you’ll
work on.
Build an end-to-end token pipeline: define tokens in Figma using Tokens Studio, export to JSON, transform with Style Dictionary, and consume in a React component. This is a larger version of the "Build a Token Pipeline" exercise, adding the Figma-to-code connection.
Before you begin
- Figma proficiency (variables, components)
- Node.js and basic CLI
- React fundamentals
- Understanding of reference, semantic, and component tokens
02 / Practice
The work,
step by step.
Work through these 4 parts at your own pace. Keep your notes and work together so you can review them when you finish.
Define Tokens in Figma
90 min
Install Tokens Studio plugin
Define reference tokens: color palette, type scale, spacing scale
Define semantic tokens that alias reference tokens
Apply tokens to a Button component in Figma (background, text, padding, border-radius)
Create a dark theme set that remaps semantic tokens
Export and Transform
60 min
Export tokens from Tokens Studio as JSON
Set up Style Dictionary v4 project
Configure transforms: JSON to CSS custom properties
Build and verify output
Consume in React
90 min
Create a small React project (Vite or Next.js)
Import the generated CSS
Build a Button component that uses only token-based CSS custom properties
Implement theme switching (light/dark) via data-theme attribute
Round-Trip Verification
60 min
Change a reference token value in Figma (e.g., shift the primary color hue)
Re-export, rebuild, verify the change propagates to the React component
Document the round-trip workflow
03 / Review
Look at what
you’ve made.
Gather your deliverables, then use the criteria to find what worked and what you would change. They also give a peer something specific to respond to.
What to bring together
- Figma file with tokens applied to a Button component
- Token JSON export (reference + semantic + component tiers)
- Style Dictionary config and generated CSS
- React Button component consuming tokens
- Theme switching demo (light/dark)
- Brief workflow documentation
How to assess your work
- Token architecture
- Clean three-tier structure with proper aliasing
- Figma-to-code
- Tokens in Figma match generated CSS values exactly
- Theming
- Theme switch works via token remapping, not hardcoded CSS
- Round-trip
- A change in Figma propagates to the React component
- Documentation
- Another designer/developer could follow the workflow