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
-
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
-
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
-
Define variant patterns
Size variants:
Color variants:
-
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
-
Calculate fluid typography
Formula:
clamp(min, preferred, max)Pre-calculated scales:
-
Set up responsive spacing
-
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
-
Prepare framework integration
React + CSS Variables:
Tailwind Config:
styled-components:
-
Sync with Figma
- Install Tokens Studio plugin
- Import design-tokens.json
- Tokens sync automatically with Figma styles
-
Handoff checklist
- Token files added to project
- Build pipeline configured
- Theme/CSS variables imported
- Component library aligned
- Documentation generated
-
Reference: See
references/developer-handoff.md
Tool Reference
design_token_generator.py
Generates complete design token system from brand color.
Examples:
Output Categories:
Quick Reference Tables
Color Scale Generation
Typography Scale (1.25x Ratio)
WCAG Contrast Requirements
Large text: ≥18pt regular or ≥14pt bold
Style Presets
Knowledge Base
Detailed reference guides in references/:
Validation Checklist
Token Generation
- Brand color provided in hex format
- Style matches project requirements
- All token categories generated
- Semantic colors include contrast values
Component System
- All sizes implemented (sm, md, lg)
- All variants implemented (primary, secondary, ghost)
- All states working (hover, active, focus, disabled)
- Uses only design tokens (no hardcoded values)
Accessibility
- Color contrast meets WCAG AA
- Focus indicators visible
- Touch targets ≥ 44×44px
- Semantic HTML elements used
Developer Handoff
- Tokens exported in required format
- Framework integration documented
- Design tool synced
- Component documentation complete

