Language PreviewDTL is currently in alpha. Explore the language, try the playground, and learn how to use it.Alpha release coming soon.
Skip to main content

Design Tokens
Language

Define your design system in code.

Type-safe tokens, native calculations, and first-class theming. Write once, deploy to any platform.

Type SafeStandards CompliantOpen Source
foundation.tokens
Language Features

Explore DTL Features

Every syntax element, type, operator, and pattern documented with examples. Learn how DTL works and see what makes it powerful.

Industry-Standard Output

DTL generates fully compliant Design Tokens Community Group (DTCG) format JSON. Works seamlessly with any tool that supports the standard.

DTCG-Compliant Output

DTCG Compliant

DTL automatically generates standard-compliant JSON following the Design Tokens Community Group specification

DTL Source
Compiles to DTCG-compliant JSON

Syntax by Example

Every language feature demonstrated with syntax-highlighted code examples. Reference documentation that shows, not just tells.

Basic Tokens

Start with simple token definitions. DTL automatically infers types from values.

Basic Token Set

Functions

Use built-in functions to generate variants, scales, and transformations.

Color Functions

Themes

Create themed variations that extend and override base token sets.

Theme Overrides

Advanced

Import, extend, and compose complex design systems with ease.

Composition & Imports
One Source, Multiple Outputs

Write Once, Deploy Everywhere

Define your design tokens in DTL once, then compile to any format you need. Currently supporting JSON and CSS, with more formats coming.

Single Source of Truth

Write your design tokens once in DTL. No duplication, no sync issues, no manual updates across multiple files.

One file to maintain
Type-safe definitions
Version controlled

DTL Source

design-system.tokens

DTCG Specification Compliant

DTL generates JSON output that fully complies with the Design Tokens Community Group Format Specification. Works seamlessly with Style Dictionary, Figma plugins, and any DTCG-compatible tool.

Learn more about DTCG compliance

JSON Output

DTCG Compliant
JSON (DTCG Compliant)

Fully compliant with Design Tokens Community Group spec • Works with Style Dictionary, Figma plugins, and more

CSS Output

tokens.css
CSS

Ready-to-use CSS custom properties for your stylesheets

No Duplication

Maintain tokens in one place. Changes automatically propagate to all output formats.

Format Flexibility

Use JSON for apps, CSS for stylesheets. More formats (SCSS, TypeScript, etc.) coming soon.

Build Integration

Compile as part of your build process. Generate outputs for different targets automatically.

When to Use DTL

When Should You Use DTL?

DTL is perfect for teams building design systems that need type safety, calculations, and first-class theming support.

Type-Safe Design Systems

Need compile-time validation and type checking for your tokens? DTL catches errors before they reach production.

Complex Calculations

Building spacing scales, color palettes, or derived tokens? DTL's native expressions make it easy.

Multi-Theme Support

Managing light/dark modes or multiple brand themes? DTL's first-class theme system handles it elegantly.

Large Token Sets

Organizing hundreds of tokens? DTL's grouping and import system keeps everything maintainable.

IDE Integration

Want autocomplete, go-to-definition, and refactoring? DTL's LSP support provides full IDE features.

Version Control

Need to track changes, review diffs, and collaborate? DTL files are text-based and git-friendly.

Why DTL?

Why Use DTL Over Other Solutions?

DTL is purpose-built for design tokens. Compare it to CSS variables, JSON, Figma Variables, and YAML.

CSS Variables

  • No calculations or expressions
  • No type safety or validation
  • Manual theme management
  • Native browser support

JSON

  • No calculations or functions
  • No type system
  • Requires external tooling
  • Universal format

Figma Variables

  • Locked to Figma ecosystem
  • Limited calculations
  • No version control workflow
  • Designer-friendly UI

YAML

  • No native calculations
  • Weak type system
  • Requires build tools
  • Human-readable

DTL Advantages

  • Type Safety: Compile-time validation catches errors before production
  • Calculations: Native expressions like large = base * 3
  • Functions: Built-in color manipulation, palette generation, and more
  • First-Class Theming: Language-level theme support with type-safe overrides
  • IDE Support: Full LSP with autocomplete, diagnostics, and refactoring
DTL Example

Try DTL in the Playground

No installation needed. Explore DTL syntax, see real-time compilation, and experiment with design tokens right in your browser.

Alpha release coming soon • CLI and VS Code extension will be available for installation