Packages
Tools#
In addition to a CLI, Tempera offers other tools to improve design tokens adoption.
stylelint-tokens#
A Stylelint plugin that helps avoid the adoption of unofficial design specifications.
Installation#
Usage#
Install Stylelint and update your configuration file to utilize the plugin.
Tokens#
The plugin expects these tokens to be in the javascript/es6 format which you can generate using Style Dictionary except exported as CommonJS modules.
In other words, flat CommonJS modules in PascalCase are expected.
Example:
Support for tokens in ES6 format is on the roadmap.
Supporting Packages#
The underlying packages that support Tempera are publicly accessible.
You are welcome and encouraged to use these packages directly should you need a custom solution.
🚀 Contributing to these packages is also welcome.
css-types#
Utilities to categorize your CSS.
Installation#
Usage#
postcss-scorecard#
A PostCSS plugin that exposes hooks into design token adoption validation.
Installation#
Usage#
Specs#
The plugin expects these specs/tokens to be in the javascript/es6 format which you can generate using Style Dictionary except exported as CommonJS modules.
In other words, flat CommonJS modules in PascalCase are expected.
Example:
Support for tokens in ES6 format is on the roadmap.
tailwind-config#
An API that generates a Tailwind configuration from a set of design tokens.
Installation#
Usage#
Tokens#
The plugin expects these specs/tokens to be in the javascript/es6 format which you can generate using Style Dictionary.
In other words, flat modules in PascalCase are expected.
Example:
twind#
An API that generates a Twind instance from a set of design tokens.
Installation#
Usage#
Tokens#
The plugin expects these specs/tokens to be in the javascript/es6 format which you can generate using Style Dictionary.
In other words, flat modules in PascalCase are expected.
Example:
stitches#
An API that generates twind/style shapes from a set of design tokens.
Demo#
Installation#
Usage#
Tokens#
The plugin expects these specs/tokens to be in the javascript/es6 format which you can generate using Style Dictionary.
In other words, flat modules in PascalCase are expected.
The tokens should follow the following format:
Examples: