principle / Semantic indirection
Semantic indirection
组件不直接消费基础值,而是消费表达设计意图的 Semantic Token。
Key fields
What
- Definition
- 组件不直接消费基础值,而是消费表达设计意图的 Semantic Token。
Why
- Core Question
- 当视觉主题或品牌变化时,如何只改变映射而不重写组件?
- Mechanism
- L2 作为别名层承接主题变化;同一个组件角色可以在不同主题下映射到不同的 L1 值。
How
- Primary Use
- 把“值”和“意义”分离,使组件契约对视觉风格保持稳定。
- Design Guidance
- 组件和页面优先引用 L2;L2 使用稳定的意图命名,例如 text.primary、surface.raised、action.primary。
Evidence
- Limitations
- 语义角色过多会造成命名漂移;需要定期合并同义角色。
- Last Verified At
- 2026-08-21
- Common Mistakes
- 用 muted、gray、blue 等视觉描述代替 primary、disabled、focus 等语义。
Lifecycle
- Status
- 在用
Related content
Relationships come from the local knowledge graph and include reverse links.