design-system
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/design-system
/design-system
If you see unfamiliar placeholders or need to check which tools are connected, see CONNECTORS.md.
Manage your design system — audit for consistency, document components, or design new patterns.
若你看到不熟悉的占位符或需要查看已连接的工具,请参阅CONNECTORS.md。
管理你的设计系统——审计一致性、记录组件或设计新模式。
Usage
使用方法
/design-system audit # Full system audit
/design-system document [component] # Document a component
/design-system extend [pattern] # Design a new component or pattern/design-system audit # 完整系统审计
/design-system document [component] # 记录单个组件
/design-system extend [pattern] # 设计新组件或模式Components of a Design System
设计系统的组成部分
Design Tokens
Design Tokens
Atomic values that define the visual language:
- Colors (brand, semantic, neutral)
- Typography (scale, weights, line heights)
- Spacing (scale, component padding)
- Borders (radius, width)
- Shadows (elevation levels)
- Motion (durations, easings)
定义视觉语言的原子值:
- 颜色(品牌色、语义色、中性色)
- 排版(字号层级、字重、行高)
- 间距(间距层级、组件内边距)
- 边框(圆角、宽度)
- 阴影(层级高度)
- 动效(时长、缓动曲线)
Components
组件
Reusable UI elements with defined:
- Variants (primary, secondary, ghost)
- States (default, hover, active, disabled, loading, error)
- Sizes (sm, md, lg)
- Behavior (interactions, animations)
- Accessibility (ARIA, keyboard)
具有以下定义的可复用UI元素:
- 变体(主要、次要、幽灵)
- 状态(默认、悬停、激活、禁用、加载、错误)
- 尺寸(sm、md、lg)
- 行为(交互、动画)
- 无障碍(ARIA、键盘操作)
Patterns
模式
Common UI solutions combining components:
- Forms (input groups, validation, submission)
- Navigation (sidebar, tabs, breadcrumbs)
- Data display (tables, cards, lists)
- Feedback (toasts, modals, inline messages)
组合组件的通用UI解决方案:
- 表单(输入组、校验、提交)
- 导航(侧边栏、标签页、面包屑)
- 数据展示(表格、卡片、列表)
- 反馈(提示框、模态框、行内消息)
Principles
原则
- Consistency over creativity — The system exists so teams don't reinvent the wheel
- Flexibility within constraints — Components should be composable, not rigid
- Document everything — If it's not documented, it doesn't exist
- Version and migrate — Breaking changes need migration paths
- 一致性优先于创意 — 设计系统的存在是为了避免团队重复造轮子
- 约束内的灵活性 — 组件应具备可组合性,而非僵化
- 记录所有内容 — 未记录的内容等同于不存在
- 版本化与迁移 — 破坏性变更需要提供迁移路径
Output — Audit
输出 — 审计
markdown
undefinedmarkdown
undefinedDesign System Audit
Design System Audit
Summary
Summary
Components reviewed: [X] | Issues found: [X] | Score: [X/100]
Components reviewed: [X] | Issues found: [X] | Score: [X/100]
Naming Consistency
Naming Consistency
| Issue | Components | Recommendation |
|---|---|---|
| [Inconsistent naming] | [List] | [Standard to adopt] |
| Issue | Components | Recommendation |
|---|---|---|
| [Inconsistent naming] | [List] | [Standard to adopt] |
Token Coverage
Token Coverage
| Category | Defined | Hardcoded Values Found |
|---|---|---|
| Colors | [X] | [X] instances of hardcoded hex |
| Spacing | [X] | [X] instances of arbitrary values |
| Typography | [X] | [X] instances of custom fonts/sizes |
| Category | Defined | Hardcoded Values Found |
|---|---|---|
| Colors | [X] | [X] instances of hardcoded hex |
| Spacing | [X] | [X] instances of arbitrary values |
| Typography | [X] | [X] instances of custom fonts/sizes |
Component Completeness
Component Completeness
| Component | States | Variants | Docs | Score |
|---|---|---|---|---|
| Button | ✅ | ✅ | ⚠️ | 8/10 |
| Input | ✅ | ⚠️ | ❌ | 5/10 |
| Component | States | Variants | Docs | Score |
|---|---|---|---|---|
| Button | ✅ | ✅ | ⚠️ | 8/10 |
| Input | ✅ | ⚠️ | ❌ | 5/10 |
Priority Actions
Priority Actions
- [Most impactful improvement]
- [Second priority]
- [Third priority]
undefined- [Most impactful improvement]
- [Second priority]
- [Third priority]
undefinedOutput — Document
输出 — 文档
markdown
undefinedmarkdown
undefinedComponent: [Name]
Component: [Name]
Description
Description
[What this component is and when to use it]
[What this component is and when to use it]
Variants
Variants
| Variant | Use When |
|---|---|
| [Primary] | [Main actions] |
| [Secondary] | [Supporting actions] |
| Variant | Use When |
|---|---|
| [Primary] | [Main actions] |
| [Secondary] | [Supporting actions] |
Props / Properties
Props / Properties
| Property | Type | Default | Description |
|---|---|---|---|
| [prop] | [type] | [default] | [description] |
| Property | Type | Default | Description |
|---|---|---|---|
| [prop] | [type] | [default] | [description] |
States
States
| State | Visual | Behavior |
|---|---|---|
| Default | [description] | — |
| Hover | [description] | [interaction] |
| Active | [description] | [interaction] |
| Disabled | [description] | Non-interactive |
| Loading | [description] | [animation] |
| State | Visual | Behavior |
|---|---|---|
| Default | [description] | — |
| Hover | [description] | [interaction] |
| Active | [description] | [interaction] |
| Disabled | [description] | Non-interactive |
| Loading | [description] | [animation] |
Accessibility
Accessibility
- Role: [ARIA role]
- Keyboard: [Tab, Enter, Escape behavior]
- Screen reader: [Announced as...]
- Role: [ARIA role]
- Keyboard: [Tab, Enter, Escape behavior]
- Screen reader: [Announced as...]
Do's and Don'ts
Do's and Don'ts
| ✅ Do | ❌ Don't |
|---|---|
| [Best practice] | [Anti-pattern] |
| ✅ Do | ❌ Don't |
|---|---|
| [Best practice] | [Anti-pattern] |
Code Example
Code Example
[Framework-appropriate code snippet]
undefined[Framework-appropriate code snippet]
undefinedOutput — Extend
输出 — 扩展
markdown
undefinedmarkdown
undefinedNew Component: [Name]
New Component: [Name]
Problem
Problem
[What user need or gap this component addresses]
[What user need or gap this component addresses]
Existing Patterns
Existing Patterns
| Related Component | Similarity | Why It's Not Enough |
|---|---|---|
| [Component] | [What's shared] | [What's missing] |
| Related Component | Similarity | Why It's Not Enough |
|---|---|---|
| [Component] | [What's shared] | [What's missing] |
Proposed Design
Proposed Design
API / Props
API / Props
| Property | Type | Default | Description |
|---|---|---|---|
| [prop] | [type] | [default] | [description] |
| Property | Type | Default | Description |
|---|---|---|---|
| [prop] | [type] | [default] | [description] |
Variants
Variants
| Variant | Use When | Visual |
|---|---|---|
| [Variant] | [Scenario] | [Description] |
| Variant | Use When | Visual |
|---|---|---|
| [Variant] | [Scenario] | [Description] |
States
States
| State | Behavior | Notes |
|---|---|---|
| Default | [Description] | — |
| Hover | [Description] | [Interaction] |
| Disabled | [Description] | Non-interactive |
| Loading | [Description] | [Animation] |
| State | Behavior | Notes |
|---|---|---|
| Default | [Description] | — |
| Hover | [Description] | [Interaction] |
| Disabled | [Description] | Non-interactive |
| Loading | [Description] | [Animation] |
Tokens Used
Tokens Used
- Colors: [Which tokens]
- Spacing: [Which tokens]
- Typography: [Which tokens]
- Colors: [Which tokens]
- Spacing: [Which tokens]
- Typography: [Which tokens]
Accessibility
Accessibility
- Role: [ARIA role]
- Keyboard: [Expected interactions]
- Screen reader: [Announced as...]
- Role: [ARIA role]
- Keyboard: [Expected interactions]
- Screen reader: [Announced as...]
Open Questions
Open Questions
- [Decision that needs design review]
- [Edge case to resolve]
undefined- [Decision that needs design review]
- [Edge case to resolve]
undefinedIf Connectors Available
若已连接工具
If ~~design tool is connected:
- Audit components directly in Figma — check naming, variants, and token usage
- Pull component properties and layer structure for documentation
If ~~knowledge base is connected:
- Search for existing component documentation and usage guidelines
- Publish updated documentation to your wiki
若已连接~~设计工具:
- 直接在Figma中审计组件——检查命名、变体及令牌使用情况
- 提取组件属性和图层结构用于文档编写
若已连接~~知识库:
- 搜索现有组件文档及使用指南
- 将更新后的文档发布到你的维基站点
Tips
提示
- Start with an audit — Know where you are before deciding where to go.
- Document as you build — It's easier to document a component while designing it.
- Prioritize coverage over perfection — 80% of components documented beats 100% of 10 components.
- 从审计开始 — 在确定方向前先了解现状。
- 边构建边记录 — 在设计组件时同步编写文档会更轻松。
- 优先覆盖而非追求完美 — 记录80%的组件胜过完美记录10个组件。