Tokens & Values
Learn the fundamentals of Systematically DSL syntax — how to define tokens, work with different value types, and organize your design system.
Basic Syntax
Tokens are defined using simple name = value syntax:
Assignment
Name equals value — that's all you need.
Nesting
Group related tokens using indentation. Each level of nesting creates a dot-separated path in the output (e.g. colors.primary).
Value Types
Systematically DSL automatically infers types from your values. No annotations needed.
Numbers
Strings
Wrap text values in double quotes:
Colors
OKLCH is our primary color space — all color calculations and output use OKLCH internally. You can enter colors in any format (Hex, RGB, HSL, named) and they'll be converted to OKLCH.
Type System
Systematically DSL has a rich type system with automatic inference. Types are detected from values:
Automatic Inference
Types are automatically inferred from values.
Types vs Scopes: A type describes the data format
(number, color, string).
A scope describes the design intent
(padding, colorForeground, fontSize).
Type Annotations
Explicitly annotate tokens with their expected type for validation:
Group Type Annotations
Annotate a group to apply type constraints to all values within it:
Scope Annotations
Scopes add semantic meaning to tokens, indicating their intended purpose. They enable better tooling support, validation, and platform integration with Figma and W3C Design Tokens.
Declaring Scopes
Use the colon syntax to annotate individual tokens, groups, or with dot-colon shorthand:
Scope Categories
Scopes cover layout, typography, color, and effects:
Composite Tokens
Composite types group related properties into a single token — typography, shadow, border, gradient, and more:
Next: Comments & Descriptions — annotate your source with //, and document tokens with /// so the description travels into JSON, Figma and CSS.