Style Dictionary: A Complete Guide to Token-Driven Design Systems.
In today’s multi-platform design and development world, consistency is everything. Teams need a way to ensure that colours, typography, spacing, and component styles are unified across web, iOS, Android, and even data visualisation platforms. This is where Style Dictionary comes in—a framework from Amazon that turns design tokens into a scalable, platform-agnostic system.
In this post, I’ll walk through an end-to-end Figma workflow tailored for data and analytics teams, drawing on lessons learned from implementing design systems inside enterprise banking and government contexts.
What Is Style Dictionary?
Style Dictionary is an open-source build tool created by Amazon that helps teams manage and distribute design tokens.
Design tokens are the single source of truth for UI attributes—things like:
Colours (e.g. primary, secondary, semantic states)
Spacing values (margins, paddings, grids)
Typography (font sizes, weights, line heights)
Shadows, radii, breakpoints, and more
Instead of manually duplicating these values in Figma, CSS, Swift, or JSON files, Style Dictionary allows you to define tokens once (usually in JSON) and then automatically generate platform-specific outputs such as:
SCSS variables
CSS custom properties
iOS Swift constants
Android XML resources
JavaScript modules
This ensures design and development remain in sync—even at enterprise scale.
How Style Dictionary Works
Define tokens in JSON
You start with a token file, for example:
{ "color": { "brand": { "primary": { "value": "#007dba" }, "secondary": { "value": "#004165" } } }, "font": { "base": { "value": "Roboto" }, "size": { "value": "16px" } } }
Configure the build
A cofig.json file tells Style Dictionary which platforms to output for and in what format.
{ "source": ["tokens/**/*.json"], "platforms": { "css": { "transformGroup": "css", "buildPath": "build/css/", "files": [{ "destination": "variables.css", "format": "css/variables" }] } } }
Run the build
By running style-dictionary build, you generate token outputs:
:root { --color-brand-primary: #007dba; --color-brand-secondary: #004165; --font-base: Roboto; --font-size: 16px; }
Use across platforms
Developers and designers now reference the same tokens, ensuring consistency and reducing duplication.
Why Use Style Dictionary?
Cross-platform consistency: Keeps web, iOS, Android, and even BI tools aligned.
Scalability: Large design systems with hundreds of tokens can be centrally managed.
Automation: Reduces manual errors when updating brand colours or typography.
Flexibility: Outputs can be customised with transforms and custom formats.
Integration: Can be integrated into CI/CD pipelines for automated updates.
Use Cases in Real Projects
Product teams: Keep apps and web experiences consistent without duplication.
DesignOps: Automate the flow from design tokens in Figma to code repositories.
Brand refreshes: Update values once and propagate changes everywhere.
Data visualisation & BI: Extend tokens to colour scales, chart templates, and dashboards (yes, even Power BI can leverage tokens via custom themes).
Best Practices
Start simple: Define core tokens (colour, type, spacing) before scaling to component tokens.
Structure your tokens carefully: Use semantic naming (color.brand.primary) rather than hardcoding (color.blue).
Automate updates: Link Style Dictionary builds into your GitHub Actions or CI/CD pipeline.
Collaborate with design tools: Tools like Figma Tokens can sync with Style Dictionary for a seamless workflow.