mcpField
D
design-system-creation

design-system-creation

github.com/secondskyデザイン・UI240492 回インストール5 週間前に更新
リポジトリ

design-system-creation について

トークン、コンポーネント、パターンを整理し、チーム間で一貫した UI 開発を支援するデザインシステム作成スキルです。アクセシビリティやダークモードを含む、ドキュメントとガバナンスの指針も扱います。

主な機能

  1. 01視覚基盤となるトークン
  2. 02コンポーネントとパターンの階層化
  3. 03コンポーネント文書の構成
  4. 04レビューと貢献のガバナンス
  5. 05アクセシビリティとダークモードの指針

活用シーン

  1. 01チーム共通の UI 基盤の策定
  2. 02再利用可能なコンポーネントのバリエーション記録
  3. 03コンポーネントのレビューとリリース手順の定義

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/secondsky/claude-skills --skill design-system-creation

インストール後、Claude Code で/design-system-creationを入力して読み込まれたか確認します。

詳細

デザインシステムの作成

チーム間で一貫した UI 開発を実現するため、包括的なデザインシステムを構築します。

デザインシステムのレイヤー

  1. 基盤:色、タイポグラフィ、間隔、エレベーション
  2. コンポーネント:ボタン、入力欄、カード、ナビゲーション
  3. パターン:フォーム、レイアウト、空の状態

基盤 - デザイントークン

:root {
  /* Colors */
  --color-primary-50: #eff6ff;
  --color-primary-500: #3b82f6;
  --color-primary-900: #1e3a8a;

  /* Semantic colors */
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error: #ef4444;

  /* Typography */
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'Fira Code', monospace;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-4: 1rem;
  --space-8: 2rem;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

コンポーネントのドキュメント

## Button

### Anatomy
- Container (padding, background)
- Label (text)
- Icon (optional)

### Variants
- Primary: Main actions
- Secondary: Alternative actions
- Ghost: Subtle actions

### States
- Default, Hover, Active, Disabled, Loading

### Accessibility
- Role: button
- Keyboard: Enter/Space to activate
- Focus: Visible focus ring

コンポーネントの例(React)

interface ButtonProps {
  variant?: 'primary' | 'secondary' | 'ghost';
  size?: 'sm' | 'md' | 'lg';
  loading?: boolean;
  disabled?: boolean;
  children: React.ReactNode;
}

function Button({ variant = 'primary', size = 'md', loading, disabled, children }: ButtonProps) {
  return (
    <button
      className={`btn btn-${variant} btn-${size}`}
      disabled={disabled || loading}
      aria-busy={loading}
    >
      {loading ? <Spinner /> : children}
    </button>
  );
}

ガバナンス

  • レビュー委員会:新しいコンポーネントを承認します
  • コントリビューションプロセス:RFC → レビュー → 実装
  • バージョン管理:リリースにはセマンティックバージョニングを使用します
  • 非推奨化:移行ガイドとともに3か月前に通知します

ベストプラクティス

  • 基盤となるトークンから始めます
  • すべてのコンポーネントを詳細にドキュメント化します
  • WCAG 2.1 AA への準拠を確保します
  • 最初からダークモードに対応します
  • 使用ガイドラインに、推奨例と非推奨例を含めます

コメント