跳到正文
Skillpedia
界面(UI/UX)29k · #9702

ui-design-system

它能做什么

这项技能搭建设计系统的基础,包括设计令牌、配色方案和组件文档。适合希望界面保持一致的设计师和前端团队。

适用场景

  • ✓当你要用颜色、字体和间距的令牌构建设计系统的时候。
  • ✓当你想把品牌主色扩展成完整配色方案的时候。
  • ✓当你需要为组件准备开发交接文档的时候。

技能链接

https://github.com/alirezarezvani/claude-skills/blob/main/product-team/skills/ui-design-system/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/alirezarezvani/claude-skills/blob/main/product-team/skills/ui-design-system/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请把我们的品牌色 #2A6FDB 转换成完整的设计令牌系统,包含字体比例和 8 点间距网格。”

每周 5 个新技能,1 分钟读完。

工作原理

它从你的品牌色和风格选择开始,借助脚本生成设计令牌和配色方案,计算字体和间距比例,并为开发者记录组件说明。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

UI Design System

Generate design tokens, create color palettes, calculate typography scales, build component systems, and prepare developer handoff documentation.


Table of Contents


Trigger Terms

Use this skill when you need to:

  • "generate design tokens"
  • "create color palette"
  • "build typography scale"
  • "calculate spacing system"
  • "create design system"
  • "generate CSS variables"
  • "export SCSS tokens"
  • "set up component architecture"
  • "document component library"
  • "calculate responsive breakpoints"
  • "prepare developer handoff"
  • "convert brand color to palette"
  • "check WCAG contrast"
  • "build 8pt grid system"

Workflows

Workflow 1: Generate Design Tokens

Situation: You have a brand color and need a complete design token system.

Steps:

  1. Identify brand color and style

    • Brand primary color (hex format)
    • Style preference: modern | classic | playful
  2. Generate tokens using script

    python scripts/design_token_generator.py "#0066CC" modern json
    
  3. Review generated categories

    • Colors: primary, secondary, neutral, semantic, surface
    • Typography: fontFamily, fontSize, fontWeight, lineHeight
    • Spacing: 8pt grid-based scale (0-64)
    • Borders: radius, width
    • Shadows: none through 2xl
    • Animation: duration, easing
    • Breakpoints: xs through 2xl
  4. Export in target format

    # CSS custom properties
    python scripts/design_token_generator.py "#0066CC" modern css > design-tokens.css
    
    # SCSS variables
    python scripts/design_token_generator.py "#0066CC" modern scss > _design-tokens.scss
    
    # JSON for Figma/tooling
    python scripts/design_token_generator.py "#0066CC" modern json > design-tokens.json
    
  5. Validate accessibility

    • Check color contrast meets WCAG AA (4.5:1 normal, 3:1 large text)
    • Verify semantic colors have contrast colors defined

Workflow 2: Create Component System

Situation: You need to structure a component library using design tokens.

Steps:

  1. Define component hierarchy

    • Atoms: Button, Input, Icon, Label, Badge
    • Molecules: FormField, SearchBar, Card, ListItem
    • Organisms: Header, Footer, DataTable, Modal
    • Templates: DashboardLayout, AuthLayout
  2. Map tokens to components

    Component Tokens Used
    Button colors, sizing, borders, shadows, typography
    Input colors, sizing, borders, spacing
    Card colors, borders, shadows, spacing
    Modal colors, shadows, spacing, z-index, animation
  3. Define variant patterns

    Size variants:

    sm: height 32px, paddingX 12px, fontSize 14px
    md: height 40px, paddingX 16px, fontSize 16px
    lg: height 48px, paddingX 20px, fontSize 18px
    

    Color variants:

    primary: background primary-500, text white
    secondary: background neutral-100, text neutral-900
    ghost: background transparent, text neutral-700
    
  4. Document component API

    • Props interface with types
    • Variant options
    • State handling (hover, active, focus, disabled)
    • Accessibility requirements
  5. Reference: See references/component-architecture.md


Workflow 3: Responsive Design

Situation: You need breakpoints, fluid typography, or responsive spacing.

Steps:

  1. Define breakpoints

    Name Width Target
    xs 0 Small phones
    sm 480px Large phones
    md 640px Tablets
    lg 768px Small laptops
    xl 1024px Desktops
    2xl 1280px Large screens
  2. Calculate fluid typography

    Formula: clamp(min, preferred, max)

    /* 16px to 24px between 320px and 1200px viewport */
    font-size: clamp(1rem, 0.5rem + 2vw, 1.5rem);
    

    Pre-calculated scales:

    --fluid-h1: clamp(2rem, 1rem + 3.6vw, 4rem);
    --fluid-h2: clamp(1.75rem, 1rem + 2.3vw, 3rem);
    --fluid-h3: clamp(1.5rem, 1rem + 1.4vw, 2.25r
    
常见问题

有哪些输出格式?

它可以把令牌导出为 CSS 变量和 SCSS 令牌。

它会检查颜色对比度吗?

会的,它可以按 WCAG 标准检查你的配色方案的对比度。

它涵盖响应式设计吗?

涵盖,它包括响应式断点和比例。

详情

作者的原始描述

Use when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.

repo: alirezarezvani/claude-skills

热度

GitHub 星标
29k
排名
#9702
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能