Skip to main content

Module tokens

Module tokens 

Source
Expand description

Design token tables.

The tables are authored here, in Rust, because Rust is the single source for everything that has two representations, and because values written in Kotlin by hand would go unverified. They are executed in the Renderer: codegen writes them into Protocol.gen.kt as Kotlin objects, so they enter the Renderer binary at build time and never cross the boundary at run time. The Host still sends roles and never a token table.

What the Renderer implementer still owns is the rules these values feed: how an elevation is drawn, how each ButtonVariant is styled, and motion.

Structs§

ColorToken
One ColorRole slot in both schemes, in ColorRole tag order.
DesignTokenTable
Items 1 to 4 of the 14.6 table for one design system.
ShapeToken
SpaceToken
TypeToken
One rung of the nine-rung type ladder (13.2).

Constants§

DESIGN_TOKENS
Every design system’s table, in DesignSystem tag order.

Functions§

table