Tokun

Build and validate design tokens. Easy.

The simple, and easy-to-use tool for working with design tokens with powerups. It can support you building themes and using it in multiple platforms.

1) CLI use

Run with npm, yarn, pnpm, or bun

 

Basic build options:--config, --input, --output, --loader, --format, --silent, --verbose, --no-warn

For more details, read Using the CLI .

2) Config use

Simple config file, which can be easily extended with custom loaders, transforms, formats, validators, etc.

/** @type {import('tokun').Config} */
export default {
  data: ["simple.tokens.json"],
  options: {
    loader: "dtcg-json",
    platforms: [
      {
        name: "css",
        format: "css",
        transforms: ["kebab-case", "css-transforms"],
        outputs: [
          {
            name: "dist/vars.css",
          },
        ],
        config: { outputReferences: false },
      },
    ],
  },
};