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:
Identify brand color and style
- Brand primary color (hex format)
- Style preference:
modern | classic | playful
Generate tokens using script
python scripts/design_token_generator.py "#0066CC" modern json
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
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
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:
Define component hierarchy
- Atoms: Button, Input, Icon, Label, Badge
- Molecules: FormField, SearchBar, Card, ListItem
- Organisms: Header, Footer, DataTable, Modal
- Templates: DashboardLayout, AuthLayout
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 |
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
Document component API
- Props interface with types
- Variant options
- State handling (hover, active, focus, disabled)
- Accessibility requirements
Reference: See references/component-architecture.md
Workflow 3: Responsive Design
Situation: You need breakpoints, fluid typography, or responsive spacing.
Steps:
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 |
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.25rem);
--fluid-body: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
Set up responsive spacing
| Token |
Mobile |
Tablet |
Desktop |
| --space-md |
12px |
16px |
16px |
| --space-lg |
16px |
24px |
32px |
| --space-xl |
24px |
32px |
48px |
| --space-section |
48px |
80px |
120px |
Reference: See references/responsive-calculations.md
Workflow 4: Developer Handoff
Situation: You need to hand off design tokens to development team.
Steps:
Export tokens in required formats
# For CSS projects
python scripts/design_token_generator.py "#0066CC" modern css
# For SCSS projects
python scripts/design_token_generator.py "#0066CC" modern scss
# For JavaScript/TypeScript
python scripts/design_token_generator.py "#0066CC" modern json
Prepare framework integration
React + CSS Variables:
import './design-tokens.css';
<button className="btn btn-primary">Click</button>
Tailwind Config:
const tokens = require('./design-tokens.json');
module.exports = {
theme: {
colors: tokens.colors,
fontFamily: tokens.typography.fontFamily
}
};
styled-components:
import tokens from './design-tokens.json';
const Button = styled.button`
background: ${tokens.colors.primary['500']};
padding: ${tokens.spacing['2']} ${tokens.spacing['4']};
`;
Sync with Figma
- Install Tokens Studio plugin
- Import design-tokens.json
- Tokens sync automatically with Figma styles
Handoff checklist
Reference: See references/developer-handoff.md
Tool Reference
design_token_generator.py
Generates complete design token system from brand color.
| Argument |
Values |
Default |
Description |
| brand_color |
Hex color |
#0066CC |
Primary brand color |
| style |
modern, classic, playful |
modern |
Design style preset |
| format |
json, css, scss, summary |
json |
Output format |
Examples:
# Generate JSON tokens (default)
python scripts/design_token_generator.py "#0066CC"
# Classic style with CSS output
python scripts/design_token_generator.py "#8B4513" classic css
# Playful style summary view
python scripts/design_token_generator.py "#FF6B6B" playful summary
Output Categories:
| Category |
Description |
Key Values |
| colors |
Color palettes |
primary, secondary, neutral, semantic, surface |
| typography |
Font system |
fontFamily, fontSize, fontWeight, lineHeight |
| spacing |
8pt grid |
0-64 scale, semantic (xs-3xl) |
| sizing |
Component sizes |
container, button, input, icon |
| borders |
Border values |
radius (per style), width |
| shadows |
Shadow styles |
none through 2xl, inner |
| animation |
Motion tokens |
duration, easing, keyframes |
| breakpoints |
Responsive |
xs, sm, md, lg, xl, 2xl |
| z-index |
Layer system |
base through notification |
Quick Reference Tables
Color Scale Generation
| Step |
Brightness |
Saturation |
Use Case |
| 50 |
95% fixed |
30% |
Subtle backgrounds |
| 100 |
95% fixed |
38% |
Light backgrounds |
| 200 |
95% fixed |
46% |
Hover states |
| 300 |
95% fixed |
54% |
Borders |
| 400 |
95% fixed |
62% |
Disabled states |
| 500 |
Original |
70% |
Base/default color |
| 600 |
Original × 0.8 |
78% |
Hover (dark) |
| 700 |
Original × 0.6 |
86% |
Active states |
| 800 |
Original × 0.4 |
94% |
Text |
| 900 |
Original × 0.2 |
100% |
Headings |
Typography Scale (1.25x Ratio)
| Size |
Value |
Calculation |
| xs |
10px |
16 ÷ 1.25² |
| sm |
13px |
16 ÷ 1.25¹ |
| base |
16px |
Base |
| lg |
20px |
16 × 1.25¹ |
| xl |
25px |
16 × 1.25² |
| 2xl |
31px |
16 × 1.25³ |
| 3xl |
39px |
16 × 1.25⁴ |
| 4xl |
49px |
16 × 1.25⁵ |
| 5xl |
61px |
16 × 1.25⁶ |
WCAG Contrast Requirements
| Level |
Normal Text |
Large Text |
| AA |
4.5:1 |
3:1 |
| AAA |
7:1 |
4.5:1 |
Large text: ≥18pt regular or ≥14pt bold
Style Presets
| Aspect |
Modern |
Classic |
Playful |
| Font Sans |
Inter |
Helvetica |
Poppins |
| Font Mono |
Fira Code |
Courier |
Source Code Pro |
| Radius Default |
8px |
4px |
16px |
| Shadows |
Layered, subtle |
Single layer |
Soft, pronounced |
Knowledge Base
Detailed reference guides in references/:
| File |
Content |
token-generation.md |
Color algorithms, HSV space, WCAG contrast, type scales |
component-architecture.md |
Atomic design, naming conventions, props patterns |
responsive-calculations.md |
Breakpoints, fluid typography, grid systems |
developer-handoff.md |
Export formats, framework setup, Figma sync |
Validation Checklist
Token Generation
Component System
Accessibility
Developer Handoff
When to Use
UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.
Covers: Trigger Terms, Workflows, Workflow 1: Generate Design Tokens, Workflow 2: Create Component System, Workflow 3: Responsive Design.
1---2name: ui-design-system3description: UI design system toolkit for Senior UI Designer including design token4 generation, component documentation, responsive design calculations, and developer5 handoff tools. Use for creating design systems, maintaining visual consistency,6 and facilitating design-dev collaboration.7risk: safe8source: community9license: MIT10metadata:11 source: https://skillmd.com/skills/jantoniofc/ui-design-system12---1314# UI Design System1516Generate design tokens, create color palettes, calculate typography scales, build component systems, and prepare developer handoff documentation.1718---1920## Table of Contents2122- [Trigger Terms](#trigger-terms)23- [Workflows](#workflows)24 - [Workflow 1: Generate Design Tokens](#workflow-1-generate-design-tokens)25 - [Workflow 2: Create Component System](#workflow-2-create-component-system)26 - [Workflow 3: Responsive Design](#workflow-3-responsive-design)27 - [Workflow 4: Developer Handoff](#workflow-4-developer-handoff)28- [Tool Reference](#tool-reference)29- [Quick Reference Tables](#quick-reference-tables)30- [Knowledge Base](#knowledge-base)3132---3334## Trigger Terms3536Use this skill when you need to:3738- "generate design tokens"39- "create color palette"40- "build typography scale"41- "calculate spacing system"42- "create design system"43- "generate CSS variables"44- "export SCSS tokens"45- "set up component architecture"46- "document component library"47- "calculate responsive breakpoints"48- "prepare developer handoff"49- "convert brand color to palette"50- "check WCAG contrast"51- "build 8pt grid system"5253---5455## Workflows5657### Workflow 1: Generate Design Tokens5859**Situation:** You have a brand color and need a complete design token system.6061**Steps:**62631. **Identify brand color and style**64 - Brand primary color (hex format)65 - Style preference: `modern` | `classic` | `playful`66672. **Generate tokens using script**68 ```bash69 python scripts/design_token_generator.py "#0066CC" modern json70 ```71723. **Review generated categories**73 - Colors: primary, secondary, neutral, semantic, surface74 - Typography: fontFamily, fontSize, fontWeight, lineHeight75 - Spacing: 8pt grid-based scale (0-64)76 - Borders: radius, width77 - Shadows: none through 2xl78 - Animation: duration, easing79 - Breakpoints: xs through 2xl80814. **Export in target format**82 ```bash83 # CSS custom properties84 python scripts/design_token_generator.py "#0066CC" modern css > design-tokens.css8586 # SCSS variables87 python scripts/design_token_generator.py "#0066CC" modern scss > _design-tokens.scss8889 # JSON for Figma/tooling90 python scripts/design_token_generator.py "#0066CC" modern json > design-tokens.json91 ```92935. **Validate accessibility**94 - Check color contrast meets WCAG AA (4.5:1 normal, 3:1 large text)95 - Verify semantic colors have contrast colors defined9697---9899### Workflow 2: Create Component System100101**Situation:** You need to structure a component library using design tokens.102103**Steps:**1041051. **Define component hierarchy**106 - Atoms: Button, Input, Icon, Label, Badge107 - Molecules: FormField, SearchBar, Card, ListItem108 - Organisms: Header, Footer, DataTable, Modal109 - Templates: DashboardLayout, AuthLayout1101112. **Map tokens to components**112113 | Component | Tokens Used |114 |-----------|-------------|115 | Button | colors, sizing, borders, shadows, typography |116 | Input | colors, sizing, borders, spacing |117 | Card | colors, borders, shadows, spacing |118 | Modal | colors, shadows, spacing, z-index, animation |1191203. **Define variant patterns**121122 Size variants:123 ```124 sm: height 32px, paddingX 12px, fontSize 14px125 md: height 40px, paddingX 16px, fontSize 16px126 lg: height 48px, paddingX 20px, fontSize 18px127 ```128129 Color variants:130 ```131 primary: background primary-500, text white132 secondary: background neutral-100, text neutral-900133 ghost: background transparent, text neutral-700134 ```1351364. **Document component API**137 - Props interface with types138 - Variant options139 - State handling (hover, active, focus, disabled)140 - Accessibility requirements1411425. **Reference:** See `references/component-architecture.md`143144---145146### Workflow 3: Responsive Design147148**Situation:** You need breakpoints, fluid typography, or responsive spacing.149150**Steps:**1511521. **Define breakpoints**153154 | Name | Width | Target |155 |------|-------|--------|156 | xs | 0 | Small phones |157 | sm | 480px | Large phones |158 | md | 640px | Tablets |159 | lg | 768px | Small laptops |160 | xl | 1024px | Desktops |161 | 2xl | 1280px | Large screens |1621632. **Calculate fluid typography**164165 Formula: `clamp(min, preferred, max)`166167 ```css168 /* 16px to 24px between 320px and 1200px viewport */169 font-size: clamp(1rem, 0.5rem + 2vw, 1.5rem);170 ```171172 Pre-calculated scales:173 ```css174 --fluid-h1: clamp(2rem, 1rem + 3.6vw, 4rem);175 --fluid-h2: clamp(1.75rem, 1rem + 2.3vw, 3rem);176 --fluid-h3: clamp(1.5rem, 1rem + 1.4vw, 2.25rem);177 --fluid-body: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);178 ```1791803. **Set up responsive spacing**181182 | Token | Mobile | Tablet | Desktop |183 |-------|--------|--------|---------|184 | --space-md | 12px | 16px | 16px |185 | --space-lg | 16px | 24px | 32px |186 | --space-xl | 24px | 32px | 48px |187 | --space-section | 48px | 80px | 120px |1881894. **Reference:** See `references/responsive-calculations.md`190191---192193### Workflow 4: Developer Handoff194195**Situation:** You need to hand off design tokens to development team.196197**Steps:**1981991. **Export tokens in required formats**200 ```bash201 # For CSS projects202 python scripts/design_token_generator.py "#0066CC" modern css203204 # For SCSS projects205 python scripts/design_token_generator.py "#0066CC" modern scss206207 # For JavaScript/TypeScript208 python scripts/design_token_generator.py "#0066CC" modern json209 ```2102112. **Prepare framework integration**212213 **React + CSS Variables:**214 ```tsx215 import './design-tokens.css';216217 <button className="btn btn-primary">Click</button>218 ```219220 **Tailwind Config:**221 ```javascript222 const tokens = require('./design-tokens.json');223224 module.exports = {225 theme: {226 colors: tokens.colors,227 fontFamily: tokens.typography.fontFamily228 }229 };230 ```231232 **styled-components:**233 ```typescript234 import tokens from './design-tokens.json';235236 const Button = styled.button`237 background: ${tokens.colors.primary['500']};238 padding: ${tokens.spacing['2']} ${tokens.spacing['4']};239 `;240 ```2412423. **Sync with Figma**243 - Install Tokens Studio plugin244 - Import design-tokens.json245 - Tokens sync automatically with Figma styles2462474. **Handoff checklist**248 - [ ] Token files added to project249 - [ ] Build pipeline configured250 - [ ] Theme/CSS variables imported251 - [ ] Component library aligned252 - [ ] Documentation generated2532545. **Reference:** See `references/developer-handoff.md`255256---257258## Tool Reference259260### design_token_generator.py261262Generates complete design token system from brand color.263264| Argument | Values | Default | Description |265|----------|--------|---------|-------------|266| brand_color | Hex color | #0066CC | Primary brand color |267| style | modern, classic, playful | modern | Design style preset |268| format | json, css, scss, summary | json | Output format |269270**Examples:**271272```bash273# Generate JSON tokens (default)274python scripts/design_token_generator.py "#0066CC"275276# Classic style with CSS output277python scripts/design_token_generator.py "#8B4513" classic css278279# Playful style summary view280python scripts/design_token_generator.py "#FF6B6B" playful summary281```282283**Output Categories:**284285| Category | Description | Key Values |286|----------|-------------|------------|287| colors | Color palettes | primary, secondary, neutral, semantic, surface |288| typography | Font system | fontFamily, fontSize, fontWeight, lineHeight |289| spacing | 8pt grid | 0-64 scale, semantic (xs-3xl) |290| sizing | Component sizes | container, button, input, icon |291| borders | Border values | radius (per style), width |292| shadows | Shadow styles | none through 2xl, inner |293| animation | Motion tokens | duration, easing, keyframes |294| breakpoints | Responsive | xs, sm, md, lg, xl, 2xl |295| z-index | Layer system | base through notification |296297---298299## Quick Reference Tables300301### Color Scale Generation302303| Step | Brightness | Saturation | Use Case |304|------|------------|------------|----------|305| 50 | 95% fixed | 30% | Subtle backgrounds |306| 100 | 95% fixed | 38% | Light backgrounds |307| 200 | 95% fixed | 46% | Hover states |308| 300 | 95% fixed | 54% | Borders |309| 400 | 95% fixed | 62% | Disabled states |310| 500 | Original | 70% | Base/default color |311| 600 | Original × 0.8 | 78% | Hover (dark) |312| 700 | Original × 0.6 | 86% | Active states |313| 800 | Original × 0.4 | 94% | Text |314| 900 | Original × 0.2 | 100% | Headings |315316### Typography Scale (1.25x Ratio)317318| Size | Value | Calculation |319|------|-------|-------------|320| xs | 10px | 16 ÷ 1.25² |321| sm | 13px | 16 ÷ 1.25¹ |322| base | 16px | Base |323| lg | 20px | 16 × 1.25¹ |324| xl | 25px | 16 × 1.25² |325| 2xl | 31px | 16 × 1.25³ |326| 3xl | 39px | 16 × 1.25⁴ |327| 4xl | 49px | 16 × 1.25⁵ |328| 5xl | 61px | 16 × 1.25⁶ |329330### WCAG Contrast Requirements331332| Level | Normal Text | Large Text |333|-------|-------------|------------|334| AA | 4.5:1 | 3:1 |335| AAA | 7:1 | 4.5:1 |336337Large text: ≥18pt regular or ≥14pt bold338339### Style Presets340341| Aspect | Modern | Classic | Playful |342|--------|--------|---------|---------|343| Font Sans | Inter | Helvetica | Poppins |344| Font Mono | Fira Code | Courier | Source Code Pro |345| Radius Default | 8px | 4px | 16px |346| Shadows | Layered, subtle | Single layer | Soft, pronounced |347348---349350## Knowledge Base351352Detailed reference guides in `references/`:353354| File | Content |355|------|---------|356| `token-generation.md` | Color algorithms, HSV space, WCAG contrast, type scales |357| `component-architecture.md` | Atomic design, naming conventions, props patterns |358| `responsive-calculations.md` | Breakpoints, fluid typography, grid systems |359| `developer-handoff.md` | Export formats, framework setup, Figma sync |360361---362363## Validation Checklist364365### Token Generation366- [ ] Brand color provided in hex format367- [ ] Style matches project requirements368- [ ] All token categories generated369- [ ] Semantic colors include contrast values370371### Component System372- [ ] All sizes implemented (sm, md, lg)373- [ ] All variants implemented (primary, secondary, ghost)374- [ ] All states working (hover, active, focus, disabled)375- [ ] Uses only design tokens (no hardcoded values)376377### Accessibility378- [ ] Color contrast meets WCAG AA379- [ ] Focus indicators visible380- [ ] Touch targets ≥ 44×44px381- [ ] Semantic HTML elements used382383### Developer Handoff384- [ ] Tokens exported in required format385- [ ] Framework integration documented386- [ ] Design tool synced387- [ ] Component documentation complete388389## When to Use390391UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.392393Covers: Trigger Terms, Workflows, Workflow 1: Generate Design Tokens, Workflow 2: Create Component System, Workflow 3: Responsive Design.