design-system

v2026.09.24

Builds scalable design systems with tokens, theming, and component architecture. Use when creating design token hierarchies, theming systems, component variant patterns, or accessibility foundations. Use for design tokens, CVA variants, dark mode, multi-brand theming, Radix headless UI, Storybook documentation, and governance.

GitHub
安装命令
npx skhub add oakoss/design-system
Markdown
SKILL.md

Design System

Overview

Single source of truth for visual consistency at scale — a shared language between design and engineering. Covers token architecture, theming infrastructure, component API patterns, accessibility compliance, and governance workflows.

Design systems are not component libraries alone. They unify tokens, patterns, documentation, and contribution processes so teams build once and maintain once.

Quick Reference

AreaPatternKey Points
Token hierarchyPrimitive > Semantic > ComponentNever reference primitives in components; semantic layer is themable
Dark modeSwap semantic tokens via data-themeUse off-white/dark-gray, not pure white/black
Multi-brand themingOverride semantic tokens per brandApply via CSS custom properties at runtime
Tailwind v4@theme block in CSS (no config file)CSS-first configuration replaces tailwind.config.js
CVA variantscva() for variant + size combinationsType-safe with VariantProps; pair with cn() utility
Compound componentsModal.Header, Modal.Body sub-partsComposition over configuration; shared context for implicit state
Headless UIRadix primitives + Tailwind classesAccessibility built-in; bring your own styles
Focus managementfocus-visible:ring-2 on all controls2px solid outline with offset; visible on keyboard only
Reduced motionprefers-reduced-motion media queryNear-zero duration for all transitions and animations
Style DictionaryJSON tokens to CSS/iOS/AndroidoutputReferences: true preserves token chain
StorybookStories + autodocs + a11y addonVisual documentation with accessibility audit built in
GovernanceSemver for tokens and componentsBreaking = removed props/tokens; minor = new additions

Common Mistakes

MistakeCorrect Pattern
Primitive tokens in components (blue-500)Reference semantic tokens (interactive-primary) that map to primitives
Skipping focus states on interactive elementsAdd focus-visible:ring-2 on every button, link, and input
Body text set to gray-400Use gray-600 or darker to meet 4.5:1 WCAG AA contrast
Circular token references between layersTokens flow one direction: primitive > semantic > component
Ignoring prefers-reduced-motionWrap all animations in a reduced-motion media query
Using scale() transforms for hoverUse translateY(-1px) and shadow changes to avoid layout shift
Hardcoded hex/px values in component filesAll visual values come from semantic or component tokens
Deep CSS nesting for theme overridesOverride CSS custom properties at the semantic layer
Theme flash on page load (FOUC)Inject synchronous theme script in <head> before body renders
Flat token list without layersOrganize into primitive, semantic, and component tiers

Delegation

  • Audit codebase for hardcoded values that should be tokens: Use Explore agent
  • Migrate a component library to a token-based design system: Use Task agent
  • Plan a multi-brand theming architecture: Use Plan agent
  • Review accessibility compliance across components: Use Task agent

If the motion skill is available, delegate animation token integration and motion design patterns to it.

References

  • Design Tokens — three-layer hierarchy, CSS custom properties, TypeScript definitions, naming conventions
  • Theming — dark mode, theme provider, multi-brand, Tailwind v4, SSR flash prevention
  • Color and Typography — 60-30-10 rule, contrast requirements, type scale, fluid typography
  • Component Architecture — CVA variants, compound components, headless UI, polymorphic rendering
  • Accessibility — WCAG compliance, keyboard navigation, ARIA patterns, screen reader testing
  • Motion and Layout — animation tokens, reduced motion, spacing grid, elevation system
  • Tooling — Style Dictionary, Storybook, component testing, visual regression
  • Governance — versioning, deprecation, contribution workflow, component lifecycle
  • Troubleshooting — common issues, dark mode fixes, token sprawl, pre-delivery checklist
发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.24

发布时间

Sep 24, 2026

分类

未分类

许可证

未指定

源路径

skills/design-system

默认分支

main

最新提交

85e3a39

Tree SHA

a4c9e7b