@doflo/design-tokens
v1.0.3
Published
<img src="preview.png" width=100% height=100%> This is a design system repository for doFlo, storing global design tokens in platform-agnostic way so they can be shared across different disciplines, tools and technologies. Design token is an information a
Downloads
427
Readme
doFlo Design Tokens
📝 How to modify
- Designers maintain and cosume design tokens through Tokens Studio.
- Developers can make changes inside the json files, and configure the export in Style Dictionary config.
- If you make changes, they will reflect in Figma, Tokens Studio and repository together. So it's very important all parties are aware of any upcoming updates.
- Do not change values of already generated variable. These will be lost any time someone makes new changes.
🗂️ Structure
- $metadata - Stores load order of token sets in Figma and Tokens Studio but doesn't impact implementation.
- $themes - Stores collections of various token sets.
- breakpoints - Contains breakpoint tokens.
- doflo - Contains global doFlo tokens which are referenced elsewhere, the core doFlo brand package.
- elevation - Contains tokens for MUI elevation styles.
- metadata - References the current version of MUI design library in Figma.
- palette - Contains definition of MUI color styles.
- Dark - Color tokens for MUI Dark mode.
- Light - Color tokens for MUI Light mode.
- shape - Contains global tokens for border radius.
- spacing - Contains global tokens for spacing/flex layouts.
- typography - Contains tokens for text.
Generating variables
Check Instructions.md and build-tokens.mjs for basic setup. See Tokens Studio - Transforming using Style Dictionary and Style Dictionary documentation to create and modify your configs.
🔩 Format
All of the regular W3C token types are supported and there are couple of extended ones, mostly for certain Figma features or to group multiple tokens together. Formatting is set automatically by Tokens Studio, but we're able to alter folder structure and reference names of each token. They can be transformed using sd-transforms for Style Dictionary.