Skip to content

Design Tokens

CDX UI design tokens live in CdxConfig, a Flutter ThemeExtension registered by createCdxTheme. The tokens define shared control height, spacing, radius, icon sizing, selected and hover tints, and the semantic status colors that Material does not provide by default.

Live Example

Open the full route: Design Tokens.

Token Families

FamilyTokens
ShapecontrolBorderRadius, containerBorderRadius
SpacingcontrolPadding, containerPadding, horizontalGap, verticalGap
SizingcontrolHeight, compactControlSize, iconSize, headerHeight
InteractionhoverTint, selectedTint, disabled button fill/text resolvers
Semantic colorssuccess, warning, neutral, critical, info and their container pairs

Prefer CdxConfig.of(context) in component code so dimensions scale with the ambient text scaler. Prefer resolver methods such as successOf(scheme) and selectedTintOf(scheme) instead of reading raw nullable color fields.