design-system-lead

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Design System Lead

设计系统负责人

Expert-level design systems for scalable product design.
面向可扩展产品设计的专业级设计系统方案。

Core Competencies

核心能力

  • Design system architecture
  • Component library design
  • Design token management
  • Documentation strategy
  • Design-dev collaboration
  • Governance and contribution
  • Adoption and training
  • Tooling and automation
  • 设计系统架构
  • 组件库设计
  • Design Token 管理
  • 文档策略
  • 设计与开发协作
  • 管控与贡献机制
  • 落地推广与培训
  • 工具链与自动化

Design System Architecture

设计系统架构

System Structure

系统结构

design-system/
├── foundations/
│   ├── colors/
│   ├── typography/
│   ├── spacing/
│   ├── elevation/
│   ├── motion/
│   └── grid/
├── components/
│   ├── primitives/     # Button, Input, Icon
│   ├── composites/     # Card, Modal, Dropdown
│   └── patterns/       # Forms, Navigation, Tables
├── layouts/
│   ├── page-templates/
│   └── content-layouts/
├── documentation/
│   ├── getting-started/
│   ├── design-guidelines/
│   └── code-guidelines/
└── assets/
    ├── icons/
    ├── illustrations/
    └── logos/
design-system/
├── foundations/
│   ├── colors/
│   ├── typography/
│   ├── spacing/
│   ├── elevation/
│   ├── motion/
│   └── grid/
├── components/
│   ├── primitives/     # Button, Input, Icon
│   ├── composites/     # Card, Modal, Dropdown
│   └── patterns/       # Forms, Navigation, Tables
├── layouts/
│   ├── page-templates/
│   └── content-layouts/
├── documentation/
│   ├── getting-started/
│   ├── design-guidelines/
│   └── code-guidelines/
└── assets/
    ├── icons/
    ├── illustrations/
    └── logos/

Maturity Levels

成熟度等级

LevelCharacteristicsFocus
1: EmergingAd-hoc styles, no standardsEstablish foundations
2: DefinedDocumented guidelinesComponent library
3: ManagedShared component libraryAdoption, governance
4: OptimizedAutomated, measuredContinuous improvement
等级特征关注重点
1级:初始阶段零散样式,无统一标准搭建基础能力
2级:已定义文档化的规范指南组件库搭建
3级:已管控共享组件库落地推广使用、规则管控
4级:已优化自动化、可量化持续迭代优化

Design Tokens

Design Token

Token Structure

Token 结构

json
{
  "color": {
    "primitive": {
      "blue": {
        "50": {"value": "#eff6ff"},
        "100": {"value": "#dbeafe"},
        "500": {"value": "#3b82f6"},
        "600": {"value": "#2563eb"},
        "900": {"value": "#1e3a8a"}
      }
    },
    "semantic": {
      "primary": {"value": "{color.primitive.blue.600}"},
      "primary-hover": {"value": "{color.primitive.blue.700}"},
      "background": {"value": "{color.primitive.gray.50}"},
      "text": {"value": "{color.primitive.gray.900}"},
      "text-secondary": {"value": "{color.primitive.gray.600}"}
    },
    "component": {
      "button": {
        "primary": {
          "background": {"value": "{color.semantic.primary}"},
          "text": {"value": "#ffffff"}
        }
      }
    }
  },
  "spacing": {
    "primitive": {
      "1": {"value": "4px"},
      "2": {"value": "8px"},
      "3": {"value": "12px"},
      "4": {"value": "16px"},
      "6": {"value": "24px"},
      "8": {"value": "32px"}
    },
    "semantic": {
      "component-padding": {"value": "{spacing.primitive.4}"},
      "section-gap": {"value": "{spacing.primitive.8}"}
    }
  },
  "typography": {
    "fontFamily": {
      "sans": {"value": "Inter, system-ui, sans-serif"},
      "mono": {"value": "JetBrains Mono, monospace"}
    },
    "fontSize": {
      "xs": {"value": "12px"},
      "sm": {"value": "14px"},
      "base": {"value": "16px"},
      "lg": {"value": "18px"},
      "xl": {"value": "20px"},
      "2xl": {"value": "24px"}
    },
    "lineHeight": {
      "tight": {"value": "1.25"},
      "normal": {"value": "1.5"},
      "relaxed": {"value": "1.75"}
    }
  },
  "borderRadius": {
    "none": {"value": "0"},
    "sm": {"value": "4px"},
    "md": {"value": "8px"},
    "lg": {"value": "12px"},
    "full": {"value": "9999px"}
  },
  "shadow": {
    "sm": {"value": "0 1px 2px 0 rgb(0 0 0 / 0.05)"},
    "md": {"value": "0 4px 6px -1px rgb(0 0 0 / 0.1)"},
    "lg": {"value": "0 10px 15px -3px rgb(0 0 0 / 0.1)"}
  }
}
json
{
  "color": {
    "primitive": {
      "blue": {
        "50": {"value": "#eff6ff"},
        "100": {"value": "#dbeafe"},
        "500": {"value": "#3b82f6"},
        "600": {"value": "#2563eb"},
        "900": {"value": "#1e3a8a"}
      }
    },
    "semantic": {
      "primary": {"value": "{color.primitive.blue.600}"},
      "primary-hover": {"value": "{color.primitive.blue.700}"},
      "background": {"value": "{color.primitive.gray.50}"},
      "text": {"value": "{color.primitive.gray.900}"},
      "text-secondary": {"value": "{color.primitive.gray.600}"}
    },
    "component": {
      "button": {
        "primary": {
          "background": {"value": "{color.semantic.primary}"},
          "text": {"value": "#ffffff"}
        }
      }
    }
  },
  "spacing": {
    "primitive": {
      "1": {"value": "4px"},
      "2": {"value": "8px"},
      "3": {"value": "12px"},
      "4": {"value": "16px"},
      "6": {"value": "24px"},
      "8": {"value": "32px"}
    },
    "semantic": {
      "component-padding": {"value": "{spacing.primitive.4}"},
      "section-gap": {"value": "{spacing.primitive.8}"}
    }
  },
  "typography": {
    "fontFamily": {
      "sans": {"value": "Inter, system-ui, sans-serif"},
      "mono": {"value": "JetBrains Mono, monospace"}
    },
    "fontSize": {
      "xs": {"value": "12px"},
      "sm": {"value": "14px"},
      "base": {"value": "16px"},
      "lg": {"value": "18px"},
      "xl": {"value": "20px"},
      "2xl": {"value": "24px"}
    },
    "lineHeight": {
      "tight": {"value": "1.25"},
      "normal": {"value": "1.5"},
      "relaxed": {"value": "1.75"}
    }
  },
  "borderRadius": {
    "none": {"value": "0"},
    "sm": {"value": "4px"},
    "md": {"value": "8px"},
    "lg": {"value": "12px"},
    "full": {"value": "9999px"}
  },
  "shadow": {
    "sm": {"value": "0 1px 2px 0 rgb(0 0 0 / 0.05)"},
    "md": {"value": "0 4px 6px -1px rgb(0 0 0 / 0.1)"},
    "lg": {"value": "0 10px 15px -3px rgb(0 0 0 / 0.1)"}
  }
}

Token Generation

Token 生成

javascript
// style-dictionary.config.js
module.exports = {
  source: ['tokens/**/*.json'],
  platforms: {
    css: {
      transformGroup: 'css',
      buildPath: 'dist/css/',
      files: [{
        destination: 'variables.css',
        format: 'css/variables'
      }]
    },
    scss: {
      transformGroup: 'scss',
      buildPath: 'dist/scss/',
      files: [{
        destination: '_variables.scss',
        format: 'scss/variables'
      }]
    },
    js: {
      transformGroup: 'js',
      buildPath: 'dist/js/',
      files: [{
        destination: 'tokens.js',
        format: 'javascript/es6'
      }]
    },
    ios: {
      transformGroup: 'ios',
      buildPath: 'dist/ios/',
      files: [{
        destination: 'StyleDictionaryColor.swift',
        format: 'ios-swift/class.swift',
        className: 'StyleDictionaryColor'
      }]
    },
    android: {
      transformGroup: 'android',
      buildPath: 'dist/android/',
      files: [{
        destination: 'colors.xml',
        format: 'android/colors'
      }]
    }
  }
};
javascript
// style-dictionary.config.js
module.exports = {
  source: ['tokens/**/*.json'],
  platforms: {
    css: {
      transformGroup: 'css',
      buildPath: 'dist/css/',
      files: [{
        destination: 'variables.css',
        format: 'css/variables'
      }]
    },
    scss: {
      transformGroup: 'scss',
      buildPath: 'dist/scss/',
      files: [{
        destination: '_variables.scss',
        format: 'scss/variables'
      }]
    },
    js: {
      transformGroup: 'js',
      buildPath: 'dist/js/',
      files: [{
        destination: 'tokens.js',
        format: 'javascript/es6'
      }]
    },
    ios: {
      transformGroup: 'ios',
      buildPath: 'dist/ios/',
      files: [{
        destination: 'StyleDictionaryColor.swift',
        format: 'ios-swift/class.swift',
        className: 'StyleDictionaryColor'
      }]
    },
    android: {
      transformGroup: 'android',
      buildPath: 'dist/android/',
      files: [{
        destination: 'colors.xml',
        format: 'android/colors'
      }]
    }
  }
};

Component Library

组件库

Component Anatomy

组件结构

markdown
undefined
markdown
undefined

Button Component

Button 组件

Anatomy

结构

┌─────────────────────────────┐ │ [Icon] Label [Icon] │ └─────────────────────────────┘ └──┬──┘ └─┬─┘ └──┬──┘ Leading Label Trailing Icon Icon
┌─────────────────────────────┐ │ [Icon] Label [Icon] │ └─────────────────────────────┘ └──┬──┘ └─┬─┘ └──┬──┘ 前置图标 文案 后置图标

Variants

变体

  • Primary: Main action
  • Secondary: Supporting action
  • Tertiary: Low-emphasis action
  • Destructive: Dangerous action
  • Primary:主操作
  • Secondary:辅助操作
  • Tertiary:弱强调操作
  • Destructive:危险操作

Sizes

尺寸

  • Small: 32px height
  • Medium: 40px height (default)
  • Large: 48px height
  • 小:32px 高度
  • 中:40px 高度(默认)
  • 大:48px 高度

States

状态

  • Default
  • Hover
  • Active/Pressed
  • Focus
  • Disabled
  • Loading
  • 默认
  • 悬停
  • 激活/按下
  • 聚焦
  • 禁用
  • 加载中

Props

Props

PropTypeDefaultDescription
variantstring'primary'Visual style
sizestring'medium'Button size
disabledbooleanfalseDisabled state
loadingbooleanfalseLoading state
leftIconReactNode-Leading icon
rightIconReactNode-Trailing icon
onClickfunction-Click handler
undefined
属性类型默认值描述
variantstring'primary'视觉样式
sizestring'medium'按钮尺寸
disabledbooleanfalse禁用状态
loadingbooleanfalse加载状态
leftIconReactNode-前置图标
rightIconReactNode-后置图标
onClickfunction-点击事件处理函数
undefined

Component Template

组件模板

typescript
// Button.tsx
import React from 'react';
import { cva, type VariantProps } from 'class-variance-authority';
import { Loader2 } from 'lucide-react';

const buttonVariants = cva(
  // Base styles
  'inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
  {
    variants: {
      variant: {
        primary: 'bg-primary text-primary-foreground hover:bg-primary/90',
        secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
        outline: 'border border-input bg-background hover:bg-accent',
        ghost: 'hover:bg-accent hover:text-accent-foreground',
        destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
      },
      size: {
        sm: 'h-8 px-3 text-sm',
        md: 'h-10 px-4 text-sm',
        lg: 'h-12 px-6 text-base',
      },
    },
    defaultVariants: {
      variant: 'primary',
      size: 'md',
    },
  }
);

interface ButtonProps
  extends React.ButtonHTMLAttributes<HTMLButtonElement>,
    VariantProps<typeof buttonVariants> {
  loading?: boolean;
  leftIcon?: React.ReactNode;
  rightIcon?: React.ReactNode;
}

export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
  ({ className, variant, size, loading, leftIcon, rightIcon, children, ...props }, ref) => {
    return (
      <button
        className={buttonVariants({ variant, size, className })}
        ref={ref}
        disabled={loading || props.disabled}
        {...props}
      >
        {loading ? (
          <Loader2 className="mr-2 h-4 w-4 animate-spin" />
        ) : leftIcon ? (
          <span className="mr-2">{leftIcon}</span>
        ) : null}
        {children}
        {rightIcon && !loading && <span className="ml-2">{rightIcon}</span>}
      </button>
    );
  }
);

Button.displayName = 'Button';
typescript
// Button.tsx
import React from 'react';
import { cva, type VariantProps } from 'class-variance-authority';
import { Loader2 } from 'lucide-react';

const buttonVariants = cva(
  // 基础样式
  'inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
  {
    variants: {
      variant: {
        primary: 'bg-primary text-primary-foreground hover:bg-primary/90',
        secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
        outline: 'border border-input bg-background hover:bg-accent',
        ghost: 'hover:bg-accent hover:text-accent-foreground',
        destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
      },
      size: {
        sm: 'h-8 px-3 text-sm',
        md: 'h-10 px-4 text-sm',
        lg: 'h-12 px-6 text-base',
      },
    },
    defaultVariants: {
      variant: 'primary',
      size: 'md',
    },
  }
);

interface ButtonProps
  extends React.ButtonHTMLAttributes<HTMLButtonElement>,
    VariantProps<typeof buttonVariants> {
  loading?: boolean;
  leftIcon?: React.ReactNode;
  rightIcon?: React.ReactNode;
}

export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
  ({ className, variant, size, loading, leftIcon, rightIcon, children, ...props }, ref) => {
    return (
      <button
        className={buttonVariants({ variant, size, className })}
        ref={ref}
        disabled={loading || props.disabled}
        {...props}
      >
        {loading ? (
          <Loader2 className="mr-2 h-4 w-4 animate-spin" />
        ) : leftIcon ? (
          <span className="mr-2">{leftIcon}</span>
        ) : null}
        {children}
        {rightIcon && !loading && <span className="ml-2">{rightIcon}</span>}
      </button>
    );
  }
);

Button.displayName = 'Button';

Documentation

文档

Component Documentation Template

组件文档模板

markdown
undefined
markdown
undefined

[Component Name]

[组件名称]

[Brief description of what the component does and when to use it.]
[简述组件的功能以及适用场景。]

Installation

安装

```bash npm install @design-system/components ```
```bash npm install @design-system/components ```

Usage

使用

```tsx import { ComponentName } from '@design-system/components';
function Example() { return <ComponentName variant="primary">Label</ComponentName>; } ```
```tsx import { ComponentName } from '@design-system/components';
function Example() { return <ComponentName variant="primary">Label</ComponentName>; } ```

Examples

示例

Basic

基础用法

[Code example with preview]
[带预览的代码示例]

With Icons

带图标

[Code example with preview]
[带预览的代码示例]

Sizes

尺寸

[Code example with preview]
[带预览的代码示例]

Props

Props

PropTypeDefaultDescription
prop1typedefaultdescription
属性类型默认值描述
prop1typedefault描述

Accessibility

无障碍

  • [ARIA attributes used]
  • [Keyboard interactions]
  • [Screen reader considerations]
  • [使用的ARIA属性]
  • [键盘交互规则]
  • [屏幕阅读器适配注意事项]

Design Guidelines

设计规范

Do

推荐

  • [Best practice 1]
  • [Best practice 2]
  • [最佳实践1]
  • [最佳实践2]

Don't

不推荐

  • [Anti-pattern 1]
  • [Anti-pattern 2]
  • [反模式1]
  • [反模式2]

Related Components

相关组件

  • [Related component 1]
  • [Related component 2]
undefined
  • [相关组件1]
  • [相关组件2]
undefined

Documentation Site Structure

文档站结构

docs/
├── getting-started/
│   ├── installation.md
│   ├── usage.md
│   └── contributing.md
├── foundations/
│   ├── colors.md
│   ├── typography.md
│   ├── spacing.md
│   └── icons.md
├── components/
│   ├── button.md
│   ├── input.md
│   ├── select.md
│   └── ...
├── patterns/
│   ├── forms.md
│   ├── navigation.md
│   └── tables.md
└── resources/
    ├── figma.md
    ├── changelog.md
    └── migration.md
docs/
├── getting-started/
│   ├── installation.md
│   ├── usage.md
│   └── contributing.md
├── foundations/
│   ├── colors.md
│   ├── typography.md
│   ├── spacing.md
│   └── icons.md
├── components/
│   ├── button.md
│   ├── input.md
│   ├── select.md
│   └── ...
├── patterns/
│   ├── forms.md
│   ├── navigation.md
│   └── tables.md
└── resources/
    ├── figma.md
    ├── changelog.md
    └── migration.md

Governance

管控机制

Contribution Process

贡献流程

REQUEST → REVIEW → BUILD → DOCUMENT → RELEASE

1. REQUEST
   - Create RFC (Request for Comments)
   - Describe problem and proposed solution
   - Gather feedback

2. REVIEW
   - Design review (Design System team)
   - Technical review (Engineering)
   - Accessibility review

3. BUILD
   - Figma component
   - Code implementation
   - Unit tests
   - Visual regression tests

4. DOCUMENT
   - API documentation
   - Usage guidelines
   - Storybook stories

5. RELEASE
   - Version bump
   - Changelog update
   - Announcement
需求提交 → 评审 → 开发 → 文档 → 发布

1. 需求提交
   - 创建RFC(意见征求稿)
   - 描述问题和 proposed solution
   - 收集反馈

2. 评审
   - 设计评审(设计系统团队)
   - 技术评审(开发团队)
   - 无障碍评审

3. 开发
   - Figma组件设计
   - 代码实现
   - 单元测试
   - 视觉回归测试

4. 文档
   - API文档
   - 使用指南
   - Storybook用例

5. 发布
   - 版本号升级
   - 更新更新日志
   - 发布公告

Version Strategy

版本策略

MAJOR.MINOR.PATCH

MAJOR: Breaking changes
- Component API changes
- Token renaming
- Behavior changes

MINOR: New features
- New components
- New variants
- New tokens

PATCH: Bug fixes
- Style fixes
- Documentation updates
- Performance improvements
主版本号.次版本号.修订号

主版本号:破坏性变更
- 组件API变更
- Token重命名
- 行为变更

次版本号:新增功能
- 新增组件
- 新增变体
- 新增Token

修订号:Bug修复
- 样式修复
- 文档更新
- 性能优化

Decision Log

决策日志

DateDecisionRationaleStatus
[Date][Decision][Why]Implemented
日期决策依据状态
[日期][决策][原因]已落地

Metrics

度量指标

Adoption Metrics

落地指标

COVERAGE
- % of products using design system
- % of components from design system

CONSISTENCY
- Design drift score
- Token compliance rate

EFFICIENCY
- Time to build new features
- Number of custom components

QUALITY
- Accessibility score
- Bug reports on components
覆盖率
- 使用设计系统的产品占比
- 来自设计系统的组件占比

一致性
- 设计偏差得分
- Token合规率

效率
- 新功能开发时长
- 自定义组件数量

质量
- 无障碍得分
- 组件相关Bug上报数量

Health Dashboard

健康仪表盘

┌─────────────────────────────────────────────────────────────┐
│                 Design System Health                         │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│  Adoption          Component Usage      Token Compliance     │
│  ████████░░ 82%   ████████░░ 78%       ██████████ 95%       │
│                                                              │
│  Products: 12/15   Components: 45       Overrides: 23        │
│                                                              │
├─────────────────────────────────────────────────────────────┤
│  Recent Activity                                             │
│  • Button v2.1.0 released (2 days ago)                      │
│  • Modal accessibility fix (1 week ago)                      │
│  • New DatePicker component (2 weeks ago)                    │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│                 设计系统健康度                         │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│  落地率          组件使用率      Token合规率     │
│  ████████░░ 82%   ████████░░ 78%       ██████████ 95%       │
│                                                              │
│  接入产品:12/15   组件总数:45       样式覆盖数:23        │
│                                                              │
├─────────────────────────────────────────────────────────────┤
│  最近动态                                             │
│  • Button v2.1.0 发布(2天前)                      │
│  • Modal 无障碍修复(1周前)                      │
│  • 新增DatePicker组件(2周前)                    │
└─────────────────────────────────────────────────────────────┘

Reference Materials

参考资料

  • references/token_architecture.md
    - Token system design
  • references/component_patterns.md
    - Component best practices
  • references/governance.md
    - Contribution guidelines
  • references/figma_setup.md
    - Figma library management
  • references/token_architecture.md
    - Token系统设计
  • references/component_patterns.md
    - 组件最佳实践
  • references/governance.md
    - 贡献指南
  • references/figma_setup.md
    - Figma库管理

Scripts

脚本

bash
undefined
bash
undefined

Token generator

Token生成器

python scripts/token_gen.py --source tokens.json --output dist/
python scripts/token_gen.py --source tokens.json --output dist/

Component scaffolder

组件脚手架

python scripts/component_scaffold.py --name DatePicker --category composite
python scripts/component_scaffold.py --name DatePicker --category composite

Adoption analyzer

落地情况分析器

python scripts/adoption_analyzer.py --repos repos.yaml
python scripts/adoption_analyzer.py --repos repos.yaml

Visual regression test

视觉回归测试

python scripts/visual_regression.py --baseline main --compare feature/new-button
undefined
python scripts/visual_regression.py --baseline main --compare feature/new-button
undefined