mcpField
G
generic-fullstack-design-system

generic-fullstack-design-system

github.com/travisjneumanデザイン・UI106138 回インストール1 日前に更新
リポジトリ

generic-fullstack-design-system について

Next.js/NestJS のフルスタックアプリ向けデザインシステムスキルです。テーマ設定、コンポーネントパターン、ダークモードなどの実装例を扱い、統一感のある UI を作る開発者を支援します。

主な機能

  1. 01テーマ設定と CSS 変数
  2. 02Tailwind の統合パターン
  3. 03shadcn/ui のコンポーネントパターン
  4. 04グラスモーフィズムとグラデーション
  5. 05ダークモードの実装
  6. 06静的アセットの整理

活用シーン

  1. 01Next.js アプリのテーマ設定
  2. 02UI への shadcn/ui パターンの適用
  3. 03アプリへのダークモード追加

インストール

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

$npx skills add https://github.com/travisjneuman/.claude --skill generic-fullstack-design-system

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

詳細

フルスタックデザインシステム

Next.js/NestJS のフルスタックアプリケーション向けデザインシステムのパターンです。

拡張元: 汎用デザインシステム - 色彩理論、タイポグラフィのスケール、スペーシングシステム、コンポーネントの状態については、基本スキルをお読みください。

テーマ設定

lib/theme.ts の構成
// lib/theme.ts - Single source of truth
export const theme = {
  colors: {
    primary: "hsl(220, 100%, 55%)",
    secondary: "hsl(180, 100%, 50%)",
    accent: "hsl(270, 70%, 60%)",
  },
  spacing: {
    xs: "4px",
    sm: "8px",
    md: "16px",
    lg: "24px",
  },
};
CSS 変数(globals.css)
:root {
  --background: #ffffff;
  --foreground: #0a0a0f;
  --primary: hsl(220, 100%, 55%);
  --primary-foreground: #ffffff;
}

.dark {
  --background: #0a0a0f;
  --foreground: #fafafa;
}
Tailwind との連携
// tailwind.config.js
module.exports = {
  theme: {
    extend: {
      colors: {
        background: "var(--background)",
        foreground: "var(--foreground)",
        primary: "var(--primary)",
      },
    },
  },
};

shadcn/ui のパターン

ボタンのバリエーション
import { Button } from '@/components/ui/button';

<Button>Primary</Button>
<Button variant="outline">Secondary</Button>
<Button variant="destructive">Delete</Button>
<Button variant="ghost">Cancel</Button>
<Button size="sm">Small</Button>
<Button size="lg">Large</Button>
フォームコンポーネント
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";

<div className="space-y-2">
  <Label htmlFor="email">Email</Label>
  <Input id="email" type="email" placeholder="[email protected]" />
</div>;
ダイアログ/モーダル
import {
  Dialog,
  DialogContent,
  DialogHeader,
  DialogTitle,
} from "@/components/ui/dialog";

<Dialog open={open} onOpenChange={setOpen}>
  <DialogContent>
    <DialogHeader>
      <DialogTitle>Confirm Action</DialogTitle>
    </DialogHeader>
    {/* Content */}
  </DialogContent>
</Dialog>;

ビジュアルエフェクト

グラスモーフィズム
.glass {
  background: hsl(var(--card) / 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid hsl(var(--border) / 0.5);
}
グラデーション背景
.bg-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

ダークモードの実装

Next.js + next-themes
// app/layout.tsx
import { ThemeProvider } from "next-themes";

export default function RootLayout({ children }) {
  return (
    <html suppressHydrationWarning>
      <body>
        <ThemeProvider attribute="class" defaultTheme="system">
          {children}
        </ThemeProvider>
      </body>
    </html>
  );
}
テーマ切り替え
import { useTheme } from "next-themes";

function ThemeToggle() {
  const { theme, setTheme } = useTheme();
  return (
    <button onClick={() => setTheme(theme === "dark" ? "light" : "dark")}>
      Toggle theme
    </button>
  );
}

アセットの整理

public/
├── images/
│   ├── logo.svg
│   └── og-image.png    # 1200x630, < 1MB
├── favicons/
│   ├── favicon.ico
│   ├── apple-touch-icon.png
│   └── favicon-32x32.png
└── site.webmanifest

関連項目

コメント