Skip to content

Latest commit

 

History

History
 
 

docs

Style Dictionary logo

npm version license PRs welcome
Build Status downloads

Style Dictionary

Style once, use everywhere.

A Style Dictionary is a system that allows you to define styles once, in a way for any platform or language to consume. A single place to create and edit your styles, and a single command exports these rules to all the places you need them - iOS, Android, CSS, JS, HTML, sketch files, style documentation, etc. It is available as a CLI through npm, but can also be used like any normal npm module if you want to extend its functionality.

When you are managing user experiences, it can be quite challenging to keep styles consistent and synchronized across multiple development platforms and devices. At the same time, designers, developers, PMs and others must be able to have consistent and up-to-date style documentation to enable effective work and communication. Even then, mistakes inevitably happen and the design may not be implemented accurately. StyleDictionary solves this by automatically generating style definitions across all platforms from a single source - removing roadblocks, errors, and inefficiencies across your workflow.

Watch the Demo on Youtube

Watch the video

Examples

See examples of Style Dictionary here

The Basics

A style dictionary consists of:

  1. Style properties, organized in JSON files
  2. Static assets (e.g. fonts, icons, images, sounds, etc.), organized into folders
  3. Configuration, defining the transformation of the properties and assets for each output platform

What a style dictionary does:

  1. Transforms style properties and assets into platform specific deliverables
  2. Creates human readable artifacts (e.g. documentation, design libraries, etc)

Things you can build with a style dictionary:

  1. Styling files for any platform
  2. Images and graphics
  3. Sketch files
  4. Documentation website
  5. Literally anything you want styles or style data in

The value of using Style Dictionary to build all of these is that they are all consistent and up to date.

The Style Dictionary framework is fully extensible and modular. You can create any type of file from a style dictionary. If there is a new language, platform, or file type you need, you can easily extend the style dictionary framework to create the necessary files.

Contributing

Please help make this framework better. For more information take a look at CONTRIBUTING.md

License

Apache 2.0