Conditionals Coming Soon

Control token generation with /if, /elseIf, and /else. Only the matching branch produces tokens — skipped branches are omitted entirely.

Conditionals are not available yet. This page documents planned behaviour coming in a future release.

Basic Syntax

Use conditionals inside iterations to vary tokens per context. Mobile requires a minimum touch target, desktop uses proportional sizing.

Mobile enforces 44px minimum, desktop doesn't
Basic Syntax

Standalone Conditionals

Conditionals also work at the top level with token references in the condition:

Standalone Conditionals

Operators

Comparison, membership, and logical operators for building conditions.

Comparison

==, !=, <, >, <=, >=

Membership

in, not in

Logical

and, or, not

Iterator Variables

Reference aliases with {alias} syntax in conditions:

Iterator Variables

Token References

Use $token references in conditions alongside iterator variables:

Token References

Membership Testing

Test if a value is in or not in a list:

Membership Testing

Complex Conditions

Combine multiple conditions with logical operators and nest conditionals.

2 devices × 2 themes with different rules
Complex Conditions

Nested Conditionals

Conditionals can be nested inside other conditionals for multi-level logic:

Nested Conditionals

Next: Modes — define responsive, themed, and multi-variant token sets.