Style Dictionary turns shared design tokens into platform-specific style files. Define tokens once in JSON or JavaScript and export to CSS, mobile, and documentation targets via CLI or Node.
Overview
Style Dictionary is a build system for design tokens: named values that describe colors, spacing, typography, motion, and similar visual attributes. Teams maintain tokens in one place and generate outputs for many platforms so styles stay aligned across iOS, Android, CSS, JavaScript, HTML, and other targets.
You configure builds with a config.json (or config.js) that lists platforms, transform groups or transforms, build paths, and output file formats. Tokens can use a category/type/item hierarchy, aliases, comments that flow into generated files, and static assets such as images or fonts alongside JSON token definitions.
The tool ships as an npm CLI installable globally or as a project dev dependency, and can also be required in Node to extend transforms and formats or plug into Grunt or Gulp. Example projects can be copied locally to start from a working token layout.
The project documents compatibility with the Design Tokens Community Group spec and provides a browser playground to experiment with token conversion, including DTCG-oriented uploads.
Key features
- Single source for design tokens
- Multi-platform file generation
- Custom transforms and formats
- Category-type-item token structure
- CLI and Node module usage
- Token aliases and references
- DTCG spec forward compatibility
- Browser playground for tokens
Use cases
- Sync design system colors across apps
- Export tokens to iOS and Android
- Generate CSS variables from JSON
- Publish style documentation outputs
- Extend builds with custom formats