本文へ移動
cccskills
無料GitHub で公開

ui-theme-reference

Canonical design token registry — colors, typography, spacing, sizing, border radius, shadows, z-index, breakpoints, motion, and focus tokens. Used by ui-best-practices rules and all agents that implement or review UI components. Includes CSS variable template for quick project setup.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md15.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

UI Theme Reference

Configurable design token registry used by ui-best-practices rules. Every hardcoded value in the best practices MUST reference a token defined here. To customize: override values below or generate via /pwdev-uiux:theme create.


How to Use

Rules in the ui-best-practices skill reference tokens as theme.<section>.<token>. When implementing, map these tokens to your stack:

StackToken formatFile
shadcn-vuehsl(var(--<token>))src/assets/index.css
shadcn-reacthsl(var(--<token>))src/app/globals.css
primevuevar(--p-<token>)src/assets/theme.css
tailwind-onlyTailwind config theme.extendtailwind.config.ts
customAny CSS variable schemeproject-specific

1. Colors

1.1 Surfaces

TokenLightDarkUsage
--background#F9FAFB · 210 20% 98%#0A0F1A · 222 84% 5%Page background
--foreground#1D2939 · 220 26% 16%#F0F4F8 · 210 40% 96%Primary text
--card#FFFFFF · 0 0% 100%#111827 · 222 47% 11%Card / surface background
--card-foreground#1D2939 · 220 26% 16%#F0F4F8 · 210 40% 96%Text on cards
--popover#FFFFFF · 0 0% 100%#111827 · 222 47% 11%Popover / dropdown bg
--popover-foreground#1D2939 · 220 26% 16%#F0F4F8 · 210 40% 96%Text on popovers

1.2 Text Hierarchy

TokenLightDarkUsage
--foreground#1D2939#F0F4F8Primary text, headings
--muted-foreground#667085#94A3B8Secondary text, labels, placeholders

1.3 Interactive

TokenLightDarkUsage
--primarybrand colorbrand color (adjusted)Buttons, links, focus rings
--primary-foreground#FFFFFF#FFFFFFText on primary backgrounds
--secondary#F1F5F9#1E293BSecondary buttons, subtle actions
--secondary-foreground#1D2939#F0F4F8Text on secondary backgrounds
--accent#F1F5F9#1E293BHover highlights, active states
--accent-foreground#1D2939#F0F4F8Text on accent backgrounds

1.4 Feedback

TokenLightDarkUsage
--success#039855#34D399Positive states, confirmations
--success-foreground#FFFFFF#022C22Text on success backgrounds
--warning#F79009#FBBF24Alerts, caution states
--warning-foreground#422006#422006Text on warning backgrounds
--destructive#D92D20#FCA5A5Errors, delete actions
--destructive-foreground#FFFFFF#450A0AText on destructive backgrounds
--info#2563EB#60A5FAInformational, tips
--info-foreground#FFFFFF#172554Text on info backgrounds

1.5 Structure

TokenLightDarkUsage
--border#EAECF0#1E293BDividers, separators
--input#D0D5DD#334155Input borders
--ringprimaryprimaryFocus ring color
--muted#F1F5F9#1E293BMuted backgrounds (badges, tags)

1.6 Reserved Semantic Colors

These colors carry universal meaning. Never repurpose them for decorative or categorical use:

ColorMeaningAllowed usage
Green (--success)Good / positive / completeSuccess states, positive KPIs, completion
Orange (--warning)Caution / attention neededWarnings, pending actions, approaching limits
Red (--destructive)Bad / error / dangerErrors, failures, destructive actions, negative KPIs

For categorical/chart colors, use the chart palette below.

1.7 Chart Palette

Dedicated colors for data visualization — independent from feedback semantics:

TokenDefaultUsage
--chart-1#2563EBPrimary data series
--chart-2#7C3AEDSecondary data series
--chart-3#0891B2Tertiary data series
--chart-4#C026D3Fourth data series
--chart-5#EA580CFifth data series
--chart-muted#D1D5DBDe-emphasized / comparison series

2. Typography

2.1 Font Stack

TokenDefaultFallbacks
--font-sansIntersystem-ui, -apple-system, sans-serif
--font-monoJetBrains Monoui-monospace, monospace

2.2 Type Scale

Progressive scale — adjacent levels must not skip more than one step:

TokenSizeLine HeightWeightUsage
--text-xs12px16px400Footnotes, badges, captions (minimum allowed)
--text-sm14px20px400Default body text, form labels
--text-base16px24px400Emphasized body, card titles
--text-lg18px28px500Section headings
--text-xl20px28px600Page sub-titles
--text-2xl24px32px600Page titles
--text-3xl30px36px700Hero headings
--text-4xl36px40px700Display / marketing headings

Constraint: never jump more than 2 steps between adjacent text elements (e.g., text-3xl → text-sm is forbidden; use text-3xl → text-xl → text-base → text-sm).

2.3 Font Weight Scale

TokenValueUsage
--font-normal400Body text
--font-medium500Labels, nav items
--font-semibold600Headings, emphasis
--font-bold700Hero, display text

3. Spacing

Base unit: 4px. All spacing must be a multiple of 4.

TokenValueTailwindTypical Usage
--space-0.52pxgap-0.5Micro adjustments only
--space-14pxgap-1Icon ↔ label gap
--space-1.56pxgap-1.5Compact inline gap
--space-28pxgap-2Internal gap, small padding
--space-312pxgap-3Badge padding, compact lists
--space-416pxgap-4, p-4Default card padding (min)
--space-520pxgap-5Medium card padding
--space-624pxgap-6, p-6Default card padding (max), section gaps
--space-832pxgap-8, p-8Large section padding
--space-1040pxgap-10Page-level vertical spacing
--space-1248pxgap-12Major section dividers
--space-1664pxgap-16Page top/bottom margins

Card Padding Rule

Card contextRecommended padding
Compact (sidebar, list items)--space-3 to --space-4 (12–16px)
Standard (content cards)--space-4 to --space-6 (16–24px)
Featured / hero cards--space-6 to --space-8 (24–32px)
CeilingNever exceed --space-8 (32px) in cards

4. Sizing

4.1 Interactive Elements

TokenValueUsage
--height-input40pxInputs, selects, single-line controls
--height-button40pxAll buttons (must match input height)
--height-button-sm32pxCompact buttons (tables, toolbars)
--height-button-lg48pxHero CTAs, prominent actions
--min-touch-target44pxMinimum tap area on touch devices (WCAG 2.5.8)

4.2 Content Width

TokenValueUsage
--max-w-form560pxForm containers (onboarding, settings)
--max-w-button400pxMax button width in wide forms
--max-w-content768pxArticle/text-heavy content
--max-w-page1280pxPage container

4.3 Textarea Height

ContextRowsApprox Height
Short input (tagline, slug)2~56px
Medium input (description)4–5~112px
Long input (feedback, notes)6–8~168px

Always enable auto-resize to grow with content.


5. Border Radius

TokenValueUsage
--radius8px (configurable)Base radius — defines product personality
--radius-smcalc(var(--radius) - 4px)Badges, small elements
--radius-mdcalc(var(--radius) - 2px)Inputs, buttons
--radius-lgvar(--radius)Cards, modals
--radius-xlcalc(var(--radius) + 4px)Feature cards, large containers
--radius-full9999pxAvatars, pills, tags

Personality Guide

Brand Style--radius value
Modern / trendy12px–16px
Neutral / corporate (safe default)8px
Enterprise / dense4px
Sharp / editorial0px–2px

6. Shadows

All shadows use #000000 with controlled opacity. No colored shadows.

TokenValueUsage
--shadow-xs0 1px 2px rgba(0,0,0,0.05)Subtle lift (inputs, badges)
--shadow-sm0 2px 4px rgba(0,0,0,0.06)Cards at rest
--shadow-md0 4px 16px rgba(0,0,0,0.08)Elevated cards, dropdowns
--shadow-lg0 8px 24px rgba(0,0,0,0.10)Modals, popovers
--shadow-xl0 16px 48px rgba(0,0,0,0.12)Command palette, overlays

Constraints:

  • Minimum opacity: 0.05 (below is invisible)
  • Maximum opacity: 0.12 (above feels heavy)
  • Never use colored shadows
  • Never use gradients as shadow replacements

7. Z-Index Scale

Managed scale to prevent z-index wars:

TokenValueUsage
--z-base0Default stacking
--z-dropdown10Dropdowns, tooltips
--z-sticky20Sticky headers, fixed navs
--z-drawer30Side drawers, panels
--z-modal40Modals, dialogs
--z-popover50Popovers over modals
--z-toast60Toast notifications
--z-command70Command palette (Cmd+K)
--z-overlay80Full-screen overlays

8. Breakpoints

TokenValueTailwindUsage
--bp-sm640pxsm:Large phones landscape
--bp-md768pxmd:Tablets
--bp-lg1024pxlg:Small laptops
--bp-xl1280pxxl:Desktops
--bp-2xl1536px2xl:Large screens

Navigation Breakpoint Rules

ViewportMax nav itemsMenu style
< md4 visibleBottom bar or hamburger
md–lg5–6 visibleTop bar or compact sidebar
≥ lgUnlimitedFull sidebar

9. Motion & Animation

TokenValueUsage
--duration-instant100msHover color changes, opacity
--duration-fast150msButton press, toggle switch
--duration-normal200msDropdown open, tooltip appear
--duration-slow300msDrawer slide, modal enter
--duration-slower500msPage transitions, skeleton fade
--ease-defaultcubic-bezier(0.4, 0, 0.2, 1)General purpose easing
--ease-incubic-bezier(0.4, 0, 1, 1)Elements leaving the screen
--ease-outcubic-bezier(0, 0, 0.2, 1)Elements entering the screen

Constraint: always respect prefers-reduced-motion: reduce — disable or minimize all animations.


10. Focus & Accessibility

TokenValueUsage
--ring-width2pxFocus ring thickness
--ring-offset2pxGap between element and focus ring
--ring-colorvar(--ring)Focus ring color (defaults to primary)

Contrast Requirements (WCAG AA)

Element TypeMinimum Ratio
Normal text (< 18px)4.5:1
Large text (≥ 18px or ≥ 14px bold)3:1
UI components (borders, icons)3:1
Non-text contrast (graphs, charts)3:1

CSS Variable Template

Minimal starter for any project — copy and customize:

@layer base {
  :root {
    /* Surfaces */
    --background: 210 20% 98%;
    --foreground: 220 26% 16%;
    --card: 0 0% 100%;
    --card-foreground: 220 26% 16%;
    --popover: 0 0% 100%;
    --popover-foreground: 220 26% 16%;
    --muted: 210 40% 96%;
    --muted-foreground: 215 16% 47%;

    /* Interactive */
    --primary: 221 83% 53%;       /* ← your brand color */
    --primary-foreground: 0 0% 100%;
    --secondary: 210 40% 96%;
    --secondary-foreground: 220 26% 16%;
    --accent: 210 40% 96%;
    --accent-foreground: 220 26% 16%;

    /* Feedback */
    --destructive: 0 72% 51%;
    --destructive-foreground: 0 0% 100%;
    --success: 160 84% 39%;
    --success-foreground: 0 0% 100%;
    --warning: 32 95% 44%;
    --warning-foreground: 26 83% 14%;
    --info: 221 83% 53%;
    --info-foreground: 0 0% 100%;

    /* Structure */
    --border: 220 13% 91%;
    --input: 218 14% 86%;
    --ring: var(--primary);

    /* Geometry */
    --radius: 0.5rem;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);

    /* Motion */
    --duration-fast: 150ms;
    --duration-normal: 200ms;
    --duration-slow: 300ms;

    /* Focus */
    --ring-width: 2px;
    --ring-offset: 2px;
  }

  .dark {
    --background: 222 84% 5%;
    --foreground: 210 40% 96%;
    --card: 222 47% 11%;
    --card-foreground: 210 40% 96%;
    --popover: 222 47% 11%;
    --popover-foreground: 210 40% 96%;
    --muted: 217 33% 17%;
    --muted-foreground: 215 20% 65%;

    --primary: 217 91% 60%;
    --primary-foreground: 222 47% 11%;
    --secondary: 217 33% 17%;
    --secondary-foreground: 210 40% 96%;
    --accent: 217 33% 17%;
    --accent-foreground: 210 40% 96%;

    --destructive: 0 63% 31%;
    --destructive-foreground: 210 40% 98%;
    --success: 142 69% 58%;
    --success-foreground: 144 61% 10%;
    --warning: 48 96% 53%;
    --warning-foreground: 22 78% 10%;
    --info: 217 91% 60%;
    --info-foreground: 222 47% 11%;

    --border: 217 33% 17%;
    --input: 217 33% 17%;
    --ring: 224 76% 48%;

    --shadow-sm: 0 2px 4px rgba(0,0,0,0.20);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.25);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.30);
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      transition-duration: 0.01ms !important;
    }
  }
}

Integration with Plugin Commands

CommandHow it uses this reference
/pwdev-uiux:theme createGenerates a customized version of the CSS template above
/pwdev-uiux:theme validateChecks all foreground/background pairs against contrast requirements
/pwdev-uiux:theme from-figmaMaps Figma variables to this token structure
/pwdev-uiux:scanAudits existing UI against these tokens
/pwdev-uiux:push-to-figma tokensSyncs these tokens to Figma variables

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Accessibility auditing and remediation skill for Vue 3 + Reka UI. Use when reviewing components, verifying WCAG 2.1 AA, fixing ARIA issues, or validating keyboard navigation in Reka UI components.

日本語の概要は準備中です。原文の説明を表示しています。

pwdev-solucoes/pwdev-claude-marketplace32026年9月28日 更新

ai-infra

無料

Infraestrutura para IA — GPU, servidores MCP, gateway de LLM, pipeline de inferência, custo de token, cache semântico e observabilidade de modelo. Use quando o usuário disser "GPU", "MCP server", "LLM", "inferência", "modelo", "gateway de IA", "custo de token", "rate limit da API de IA", "self-host de modelo".

日本語の概要は準備中です。原文の説明を表示しています。

pwdev-solucoes/pwdev-claude-marketplace32026年9月28日 更新

alt-text

無料

Escreve texto alternativo e descrição de imagem para peças de rede social. Use quando o usuário disser "alt text", "texto alternativo", "descrição da imagem", "acessibilidade da peça", "descrever para leitor de tela", ou automaticamente antes de qualquer publicação. Obrigatório em todas as peças — em carrossel, um por slide.

日本語の概要は準備中です。原文の説明を表示しています。

pwdev-solucoes/pwdev-claude-marketplace32026年9月28日 更新

Organiza, compara e seleciona entre as variações geradas, e publica a grade de comparação como Artifact para aprovação do time. Use quando o usuário disser "qual dessas", "comparar as variações", "escolher a melhor", "mostrar as opções", "montar grade de aprovação", ou após qualquer lote de geração. Selecionar é trabalho, não detalhe.

日本語の概要は準備中です。原文の説明を表示しています。

pwdev-solucoes/pwdev-claude-marketplace32026年9月28日 更新

Aumenta resolução e qualidade de imagem via Freepik/Magnific, ou orienta o processo manual quando não há chave. Use quando o usuário disser "upscale", "melhorar a resolução", "a imagem está pixelada", "Magnific", "Freepik", "aumentar a imagem", "imagem pequena demais". Gasta crédito — exige confirmação.

日本語の概要は準備中です。原文の説明を表示しています。

pwdev-solucoes/pwdev-claude-marketplace32026年9月28日 更新

CI/CD e automação — GitHub Actions, Terraform, OpenTofu, Ansible, n8n. Use quando o usuário disser "pipeline", "CI/CD", "GitHub Actions", "workflow", "terraform", "ansible", "n8n", "automatizar", "deploy automático", "IaC".

日本語の概要は準備中です。原文の説明を表示しています。

pwdev-solucoes/pwdev-claude-marketplace32026年9月28日 更新

pwdev-solucoes のスキルをすべて見る

このスキルの問題を報告する