CLI tool
style-dictionary/style-dictionary avatar
style-dictionary/style-dictionary

Style Dictionary: A Build System for Cross-Platform Design Tokens

A build system for creating cross-platform styles.

4,842 stars632 forksJavaScriptApache-2.0

At a glance

What is it?
Style Dictionary turns JSON or JavaScript design tokens into CSS, SCSS, Android XML, iOS and other platform outputs from one config. Here is how the build works, how to install it, and where it stops being the right tool.
Who is it for?
Adopt Style Dictionary if you maintain a design-token source of truth and need generated artifacts for more than one platform, and if your toolchain can run Node 22 or newer. Do not adopt it if you need a token editor or a Figma plugin: the README describes a build system, not a design interface, so designers must edit JSON or JavaScript.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The problem Style Dictionary solves: one token source, many platform outputs

Design tokens are key/value pairs describing colors, sizes, icons and motion. The README states that a style dictionary defines these tokens in JSON or JavaScript files, and can also include static assets such as images and fonts. The problem it addresses is stated plainly: keeping styles consistent across multiple development platforms and devices is challenging, and designers, developers and PMs need up-to-date style documentation to work together. Style Dictionary answers that by generating style definitions across all platforms from a single source. The audience is therefore teams with a shared token set and more than one consumer: a web app, an Android app, an iOS app, or documentation. A single-platform project with one CSS file gains little from a build step that reads tokens/**/*.json and writes a variables file. The value appears when the same color has to exist as a CSS custom property, an Android XML resource and a Swift constant, and someone has to keep the three in sync by hand.

How the build works: source globs, platforms, transforms and formats

The mechanism is a config file plus a build pass. The README gives this example of a config.json: a source array of globs ("tokens/**/*.json"), and a platforms object where each key is a target. Each platform names a transformGroup, a buildPath and a files array. A file entry has a destination and a format, for example "scss/variables" writing to "scss/_variables.scss", or "android/fontDimens" writing to font_dimens.xml. The transformGroup decides how raw token values are converted for that target, and the format decides the shape of the emitted file. The default config path is config.json or config.js in the project root, and the CLI accepts --config to point elsewhere. The README notes that the config file passed to --config must be a .json file. That is the whole data flow: read token files, apply transforms per platform, render each file through its format, write to buildPath. Nothing is inferred from your source tree beyond what the config declares, so a token file that is not matched by the source globs simply does not exist as far as the build is concerned.

Installing Style Dictionary and running a first build

Node and npm are required. The README says you must have node (and npm) installed, and package.json sets engines.node to ">=22.0.0", so a Node 22 or newer runtime is the supported floor. For a project dependency, install it as a dev dependency:

bash
npm install -D style-dictionary

Or globally if you only want the CLI:

bash
npm install -g style-dictionary

With yarn, the README gives this form:

bash
yarn add style-dictionary --dev

Then create a config.json in the project root. This is the README's example, trimmed to one platform:

json
{
  "source": ["tokens/**/*.json"],
  "platforms": {
    "scss": {
      "transformGroup": "scss",
      "buildPath": "build/",
      "files": [
        {
          "destination": "scss/_variables.scss",
          "format": "scss/variables"
        }
      ]
    }
  }
}

Run the build from the project root:

bash
style-dictionary build

The only thing needed is the config file. After the command completes, the expected result is a generated SCSS variables file at build/scss/_variables.scss. The CLI also takes --platform (short -p) to build a single platform, --config (short -c) to choose a config file, plus --help and --version. If you would rather drive it from JavaScript, the README shows the module form:

javascript
const StyleDictionary = require('style-dictionary').extend('config.json');

StyleDictionary.buildAllPlatforms();

The .extend() method is overloaded and also accepts a config object directly, which is the path to take when another build system such as Grunt or Gulp drives the work.

Where Style Dictionary is the wrong tool

The README describes a build system, not an editor. There is no mention of a GUI for authoring tokens, no Figma integration, and no hosted token service. If your designers expect to change a color in a visual tool and have the build pick it up, Style Dictionary only covers the second half of that loop: it consumes token files, it does not produce or host them. The second limitation is the runtime. package.json requires Node >=22.0.0 and declares "type": "module", so this is an ESM package. A project pinned to an older Node line, or a CommonJS-only pipeline, has to upgrade or stay on an older major. The README's own module example still uses require(), which is worth checking against your setup before you copy it. Third, the CLI config constraint: --config must be a .json file, so teams that want a config with computed values need the Node API or a config.js in the root rather than the CLI flag. Finally, the generated artifacts are only as good as the token source. Style Dictionary will faithfully write whatever your JSON says, including a duplicated or misspelled token, and it has no opinion about naming conventions beyond the transforms you configure.

Style Dictionary compared with Terrazzo and Theo

Terrazzo and Theo occupy the same slot: token transformation and output generation. The practical difference is the extension model. Style Dictionary exposes formats, transformGroups and a Node API through .extend(), and the README points to an examples/ directory in the repository with basic, advanced and complete configurations. That means a team writing a custom output format does so as a module inside their own build, against the same config object the CLI reads. Theo, by contrast, is remembered for a more opinionated set of output formats with less configuration surface. The trade-off runs in both directions: Style Dictionary asks you to describe platforms, transform groups, build paths and destinations explicitly, which is more config to maintain but also more places to intervene when a target needs something unusual. If your output list is short and standard, the extra config is overhead. If you need a bespoke format, the extension points are the reason to pick it.

Maintenance, versioning and the Apache-2.0 licence

The repository is not archived, and the last push was on 2026-09-20. Releases v5.5.3, v5.5.4 and v5.5.5 landed on 2026-09-06, 2026-09-18 and 2026-09-20 respectively, and v5.5.5 matches the version in package.json. The repository carries a .changeset/ directory, which is the changeset workflow for recording release notes, and the README links a migration guide for the 4.0 release. That combination suggests upgrades arrive as documented major steps rather than silent breakage, but the README does not document a rollback procedure, so a team that pins a version and later needs to revert should plan for that themselves. On licensing: the project is Apache-2.0, and the repository includes both a LICENSE and a NOTICE file. Apache-2.0 is a permissive licence that includes an explicit patent grant and requires the NOTICE file to be preserved in distributions. The npm package's files list includes NOTICE, so it ships with the published artifact. This is a description of the licence text, not legal advice; if you redistribute generated output or embed the library, have your own counsel read the NOTICE requirements.

Editorial conclusion

Adopt Style Dictionary if you maintain a design-token source of truth and need generated artifacts for more than one platform, and if your toolchain can run Node 22 or newer. Do not adopt it if you need a token editor or a Figma plugin: the README describes a build system, not a design interface, so designers must edit JSON or JavaScript. Before committing, verify that Node >=22 is available in CI, that your config.json parses under the current version, and that the generated files under build/ land where your consumers expect them.

Frequently asked questions

What is Style Dictionary?

It is a build system for creating cross-platform styles. It defines design tokens once in JSON or JavaScript and exports them to CSS, SCSS, Android XML, iOS and other targets from a single config file.

How do I use Style Dictionary?

Install it with npm as a dev dependency or globally, create a config.json with a source glob and a platforms object, then run style-dictionary build from the project root. The CLI also accepts --config and --platform flags.

What is the difference between Style Dictionary and Tokens Studio?

The README describes Style Dictionary as a build system that consumes token files and generates platform outputs. It does not mention Tokens Studio or any token authoring interface, so a direct comparison cannot be made from the documentation.

What is the Amazon Style Dictionary?

The README does not mention Amazon. The project's homepage is styledictionary.com and the package is published on npm as style-dictionary.

What does the word "style" mean?

In this project the word refers to stylistic attributes such as colors, sizes, icons and motion, which are stored as design tokens in JSON or JavaScript files and exported to each target platform.

Official sources

  1. License: Apache-2.0
  2. Project website
  3. README
  4. Releases
  5. style-dictionary/style-dictionary on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/style-dictionary-style-dictionary.svg)](https://hysenlabs.com/projects/style-dictionary-style-dictionary)