Loading...

DDD as design tokens

820 tokens in 29 groups, 256 dark-mode overrides, generated from the element source.

DDD token export

  1. DDD lives in the elements' CSS. The export turns it into DTCG JSON that design tools read. (DDD token export, DDD, $metadata.json, $themes.json, ddd.dark.tokens.json, ddd.tokens.json)
  2. The groups, named after the CSS custom properties. (ddd.color (101), ddd.font (34), ddd.letterSpacing (26), ddd.lineHeight (4), ddd.spacing (31), ddd.border (8), ddd.headerBorder (16), ddd.dropZone (6), ddd.shadow (5), ddd.breakpoint (4), ddd.layout (19), ddd.radius (8), ddd.icon (11), ddd.zIndex (6), ddd.opacity (6), ddd.duration (4), ddd.easing (5), ddd.focus (2), ddd.textfieldHeight (3), ddd.controlHeight (4), ddd.targetSize (2), ddd.mediaControl (8), ddd.state (5), ddd.eyebrow (9), ddd.aspectRatio (3), ddd.skeleton (5), ddd.status (29))
  3. SimpleColors comes along, fixed and default; the default palette flips in dark mode. (simple-colors.fixed (228), simple-colors.default (228), ddd.dark.tokens.json)
  4. Every token has a DTCG type. (color, untyped, fontFamily, fontWeight, dimension, number, border, shadow, duration, cubicBezier)
  5. build-tokens.js reads the element source and writes the files; CI fails a pull request when they fall out of date. (build-tokens.js, DDDStyles.js, DDDStatusTokens.js, simple-colors-shared-styles.js, simple-colors.js, DDDLayout.js, Lint DDD token references, DTCG token export is up to date, DDD token lint)
  6. Design tools read them. (Figma via Tokens Studio, Style Dictionary, Penpot, $themes.json, ddd.tokens.json)
  7. The whole export.