principle / Component contract stability
Component contract stability
L3 Component Token 表达组件稳定的槽位契约,而不是某个页面的临时样式。
Key fields
What
- Definition
- L3 Component Token 表达组件稳定的槽位契约,而不是某个页面的临时样式。
Why
- Core Question
- 组件如何暴露足够稳定的视觉接口,同时允许内部主题变化?
- Mechanism
- Component Slot 明确组件部位;L3 Token 为每个部位提供稳定角色;L4 只处理变体与状态差异。
How
- Primary Use
- 把组件 Anatomy、属性和 Token 绑定关系固定下来,减少页面级覆盖。
- Design Guidance
- 为 Container、Label、Icon、Border、Content、Action 等槽位建立契约。
Evidence
- Limitations
- 复杂组件可能有多个 slot 数据库记录;必须避免把页面结构塞进基础组件。
- Last Verified At
- 2026-08-21
- Common Mistakes
- 把一次性布局间距误建成公共组件 Token。
Lifecycle
- Status
- 在用
Related content
Relationships come from the local knowledge graph and include reverse links.