Projects

Design Tokens Transformer

On TrackSproutPublicFeatured
Style DictionaryTypeScriptNode.JsTailwindCSSSass

Overview

Design Tokens Transformer is a utility that takes design token JSON files and converts them into platform-specific outputs such as:

  • CSS / SCSS variables
  • Tailwind configuration
  • JavaScript / TypeScript modules
  • iOS (Swift)
  • Android (XML)

The goal is to allow teams to define design decisions once and generate consistent outputs for multiple platforms from the same source of truth.


Problem It Solves

Design tokens often start as structured JSON, but each platform needs them in different formats:

  • Web needs CSS or Tailwind configs
  • Native apps need strongly typed values
  • Design systems need predictable naming
  • Developers need automation, not manual mapping

Without a transformer:

  • Tokens drift between platforms
  • Changes require repetitive manual work
  • Validation and previewing are difficult

This project removes that friction.


What It Does

  • Reads token JSON files
  • Normalizes token structure
  • Applies transformation rules per platform
  • Outputs consumable artifacts
  • Supports live preview of results

Example outputs:

  • tokens.css
  • tokens.scss
  • tailwind.config.js
  • tokens.ts
  • Colors.swift
  • colors.xml

Architecture

High-level flow:

  1. Input Design tokens defined in JSON
  2. Transform Rules convert tokens into platform formats
  3. Output Generated files per platform
  4. Preview Web UI shows rendered results

Tech Stack

  • Node.js
  • TypeScript
  • Style Dictionary (core transformer)
  • Tailwind CSS (output target)
  • Simple web UI for preview

Status

Sprout 🌱

The core transformer works, but the project is still evolving:

  • Token schema may change
  • Output formats are being refined
  • UI is functional but not polished

Intended Users

  • Design system teams
  • Frontend engineers
  • Mobile engineers
  • Token authors
  • Tooling / platform engineers

Design Principles

  • Single source of truth
  • Platform-agnostic inputs
  • Predictable outputs
  • Automation over duplication
  • Human-readable artifacts

Example Use Cases

  • Generate Tailwind tokens from Figma tokens
  • Sync web and mobile colors
  • Produce theme files for multiple brands
  • Validate token naming and structure
  • Preview token changes before release

Future Enhancements

  • Schema validation
  • Plugin-based output targets
  • Theming support
  • Token diffing
  • Versioned exports
  • CI integration

  • design-tokens
  • design-systems
  • style-dictionary
  • tailwind
  • automation

Why This Lives in the Digital Garden

This project is:

  • A long-term tool
  • A learning sandbox
  • A design systems reference
  • A reusable internal utility

It will likely evolve over time rather than “finish” once.


Screenshots

Next Actions

  • Add Tailwind config output support
  • Add token validation and error reporting
  • Improve live preview UI
  • Document usage with examples
  • a: Appearance
  • ?: Keyboard shortcuts