Loading...
Loading...
UI/UX design intelligence. Plan, build, design, implement, review, improve UI/UX code. Styles: glassmorphism, minimalism, dark mode, responsive. Projects: landing page, dashboard, SaaS, mobile app.
npx skill4agent add kimny1143/claude-code-template ui-ux-pro-max| テキストサイズ | 最小コントラスト比 |
|---|---|
| 通常テキスト (< 18px) | 4.5:1 |
| 大きいテキスト (≥ 18px bold / ≥ 24px) | 3:1 |
| UI コンポーネント・アイコン | 3:1 |
globals.css// NG: Tailwind デフォルトをそのまま使用
<p className="text-slate-400">...</p>
<p className="text-slate-500">...</p>
// OK: プロジェクトトークンを使用
<p className="text-muted">...</p>
<p className="text-subtle">...</p>app/globals.css| 背景タイプ | 問題 | 対策 |
|---|---|---|
| 実効背景色が不確定 | テキストは |
| 下層と混ざる | 重要テキストは |
| 半透明セクション | 背景画像と混ざる | muted text は避け、白系を使用 |
// Glass card 内のテキスト
<div className="bg-white/5 backdrop-blur-xl ...">
<h3 className="text-white">タイトル</h3> {/* OK: 白は常に安全 */}
<p className="text-white/80">説明文</p> {/* OK: 80%白は十分 */}
</div>
// 危険な組み合わせ(避ける)
<div className="bg-white/5 ...">
<p className="text-slate-400">説明文</p> {/* NG: コントラスト不足の可能性 */}
</div>// NG: 同系色でコントラスト不足
<span className="bg-indigo-600/20 text-indigo-400">Badge</span>
<span className="bg-amber-500/20 text-amber-400">開発中</span>
// OK: 十分なコントラストを確保
<span className="bg-indigo-600/30 text-indigo-300">Badge</span>
<span className="bg-amber-600/30 text-amber-200">開発中</span>// NG: 薄すぎてコントラスト不足
<button className="text-white/50" disabled>...</button>
// OK: 無効でも読める濃さ
<button className="text-white/70" disabled>...</button>| トークン | 用途 | 英語 (デスクトップ) | 日本語 (デスクトップ) |
|---|---|---|---|
| ランディングページのメインタイトル | 96px | 80px |
| セクション見出し(h2) | 48px | 40px |
| 機能タイトル、製品見出し | 30px | 24px |
| タグライン、リード文 | 24px | 20px |
// NG: Tailwind直接指定(言語による調整なし)
<h1 className="text-5xl md:text-8xl font-bold">...</h1>
// OK: トークン使用(自動で言語対応)
<h1 className="text-hero text-white">...</h1>// NG: 冗長なブレークポイント指定
<h1 className="text-hero sm:text-hero md:text-hero">...</h1>
// OK: トークンのみ
<h1 className="text-hero">...</h1>text-white/80globals.css| トークン | 値 | 用途 |
|---|---|---|
| 8px | 小さいバッジ、タグ |
| 12px | ボタン、入力フィールド |
| 16px | カード、モーダル |
| 999px | ピル型ボタン、アバター |
// NG: Tailwind直接指定
<button className="rounded-lg">...</button>
<div className="rounded-xl">...</div>
// OK: トークン使用
<button className="rounded-[var(--radius-md)]">...</button>
<div className="rounded-[var(--radius-lg)]">...</div>// NG: Tailwind色を直接使用
<p className="text-slate-400">...</p>
<div className="bg-gray-900">...</div>
// OK: プロジェクトトークン使用
<p className="text-muted">...</p>
<div className="bg-mued-bg">...</div># 角丸のTailwind直接指定を検索
grep -r "rounded-sm\|rounded-md\|rounded-lg\|rounded-xl\|rounded-2xl" components/
# 色のTailwind直接指定を検索
grep -r "bg-slate-\|bg-gray-\|text-slate-\|text-gray-" components//* Glass card - a11y compliant */
.glass-card {
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 16px;
}text-whitetext-white/80/* Dark mode base - WCAG compliant */
:root {
--bg-primary: #0F0F1A;
--bg-secondary: #1A1A2E;
--text-primary: #FFFFFF;
--text-muted: #CBD5E1; /* slate-300: 4.5:1+ on dark */
--text-subtle: #9CA3AF; /* gray-400: 使用注意 */
--accent: #4F46E5;
}// Primary CTA
<button className="bg-indigo-600 hover:bg-indigo-700 text-white px-6 py-3 rounded-lg transition-colors cursor-pointer">
CTA
</button>
// Secondary
<button className="bg-white/10 hover:bg-white/20 text-white px-6 py-3 rounded-lg transition-colors cursor-pointer">
Secondary
</button>
// Disabled - コントラスト維持
<button className="bg-white/5 text-white/70 cursor-not-allowed" disabled>
Disabled
</button>// Glass card with accessible text
<div className="bg-white/5 backdrop-blur-xl border border-white/10 rounded-2xl p-6">
<h3 className="text-white font-semibold">Title</h3>
<p className="text-white/80">Description with sufficient contrast</p>
</div>// ソリッド背景(#0F0F1A 等)での使用
<h1 className="text-4xl font-bold text-white">見出し</h1>
<h2 className="text-2xl font-semibold text-white">サブ見出し</h2>
<p className="text-lg text-muted">本文(プロジェクトトークン使用)</p>
<span className="text-sm text-subtle">補足</span>
// Glass card 内での使用
<h3 className="text-white">タイトル</h3>
<p className="text-white/80">説明文</p>import { Music, Brain, Sparkles, Check, X } from 'lucide-react';/* Mobile first */
/* sm: 640px */
/* md: 768px */
/* lg: 1024px */
/* xl: 1280px */
/* 2xl: 1536px */# ローカル確認
npm run dev
lighthouse http://localhost:3000 --only-categories=accessibility --view
# 詳細な失敗項目の確認
lighthouse http://localhost:3000 --only-categories=accessibility --output=json | jq '.audits["color-contrast"]'