03 — Language System

Primitive Types


IDL defines seven primitive types: Color, Dimension, Duration, Number, String, Boolean, and Enum. All token values MUST resolve to one of these seven primitive types. Composite types are defined as structured records of primitives. No custom primitive type may be introduced without a grammar-level specification change.

Primitive Type Definitions

TypeValue DomainExample
ColorsRGB hex, named color references, or platform-declared color space tokens#3B82F6 · oklch(60% 0.2 240)
DimensionNon-negative number with unit: px, rem, %8px · 1rem · 50%
DurationNon-negative number with unit: ms, s200ms · 0.2s
NumberRational number, positive or negative1.5 · -0.5 · 0
StringUTF-8 string literal"Inter" · "sans-serif"
Booleantrue or falsetrue · false
EnumNamed member of a declared enumerationdensity.compact · easing.linear

Type Coercion

IDL does not perform implicit type coercion. A token declared as type Color MUST be assigned a Color value; assigning a String value that happens to contain a valid hex code is a Transform error. Type declarations are strict. This eliminates a class of ambiguities where the same string could be interpreted differently by different emitters or consumers.

Composite Types

Composite types are named structures composed of primitive types. The typography scale tuple (size: Dimension, weight: Number, lineHeight: Number, letterSpacing: Dimension) is a composite type. Composite types are declared in the IDL system schema; they cannot be declared inline in module files. The compiler validates composite type conformance during Transform.