/frontend-design:graphic-ux-ui-designfrom frontend-design
UX/UI and graphic design reference covering visual design fundamentals, component patterns, accessibility standards (WCAG 2.2, APCA), UX research methods, and design systems including token architecture and Atomic Design.
Ships in frontend-design. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Most "best practices" are context rules. The strongest, most replicated findings (top-aligned labels, 50–75ch line length, dark-grey dark mode, skeleton screens for content loading, "Load More" over infinite scroll for goal-driven tasks, semantic HTML before ARIA) hold across platforms. Density, motion, and navigation choices depend on whether you serve consumers or power users. Accessibility is the single biggest gap between rhetoric and reality: WebAIM's 2026 scan found 83.9% of top 1M home pages have low-contrast text (up from 79.1% in 2025), 56.1 errors/page. The fixes are trivial and known — they simply aren't implemented.
Production color architecture uses three token tiers:
blue-500: #3B82F6color-action-primary, color-text-primary, color-status-errorbutton-bg-primaryApplications consume semantic tokens, not primitives. Theming and dark mode become a matter of re-pointing semantic tokens, not editing components. Neutral scales (9–12 steps) carry most of the surface area.
| Level | Normal text | Large text (≥24px or 18.7px bold) | Non-text UI |
|---|---|---|---|
| AA | 4.5:1 | 3:1 | 3:1 |
| AAA | 7:1 | 4.5:1 | — |
Global regulations (Section 508, EN 301 549, AODA) target AA. AAA is aspirational and not always achievable. Low-contrast text is the #1 accessibility defect for seven straight years. Do not wait for WCAG 3/APCA to be final — keep conforming to WCAG 2.x AA for compliance; use APCA as a supplementary check (especially for dark themes); never claim "WCAG 3 compliance" (it doesn't exist yet as of 2026).
CSS Color Level 4 (oklch(), oklab(), color(display-p3)) is Baseline Widely Available (Chrome/Edge 111+, Firefox 113+, Safari 15.4+).
Why oklch matters:
Always declare sRGB hex fallbacks first for old browsers.
Never use pure black (#000000). Material Design recommends #121212 as the base dark surface — pure black causes halation/blooming and disables shadows.
Express elevation through lightness, not shadow:
| Layer | Approximate L% |
|---|---|
| Base | 10–12% |
| Sidebars | 14–16% |
| Cards | 17–20% |
| Modals | 22–26% |
| Popovers | 26–30% |
Keep 3–5 points between each level. Desaturate accent colors (they vibrate against dark surfaces). Use off-white (#E1E1E1 or white at 87% opacity) rather than pure white text. A naive light-palette inversion fails — light and dark modes have asymmetric perceptual requirements. Always let users toggle; don't force it.
| Guideline | Value |
|---|---|
| Optimal line length | 50–75 characters (66ch sweet spot) |
| WCAG line length cap | 80 characters (40 for CJK) |
| CSS implementation | max-width: 66ch |
| Line height (body) | ~1.5 |
| Fluid type | clamp() to preserve ch range across viewports |
Hierarchy priority: size → weight → color → spacing. Adding typefaces is the classic mistake. Variable fonts are worth the complexity only when shipping multiple weights/widths.
Web font loading: font-display: swap (or optional for CLS-sensitive cases), <link rel="preload"> for the critical font, size-adjust/ascent-override on fallback @font-face to minimize layout shift.
Content density is a genuine fork:
| Pattern | When to use |
|---|---|
| Top nav | Marketing sites, shallow IA |
| Side nav | Deep app-like hierarchies (SaaS, admin) |
| Bottom nav | Mobile top-level (3–5 destinations, thumb zone) |
| Mega menus | Broad e-commerce/content taxonomies |
The "≤7 menu items" rule is a myth — a misapplication of Miller's Law. Breadth often beats depth; it reduces clicks and keeps users oriented.
Top-aligned labels are the most usable and accessible default. Advantages over left-aligned:
Rules:
Hierarchy: primary → secondary → tertiary/ghost → destructive (visually distinct).
All interactive states must be visually distinct: hover, focus, active, disabled, loading.
Touch target sizes:
| Standard | Minimum |
|---|---|
| Apple HIG | 44×44 pt |
| Material | 48×48 dp (~9mm) |
| WCAG 2.2 AA | 24×24 CSS px |
| WCAG 2.5.5 AAA | 44×44 CSS px |
| visionOS | 60 pt (gaze-based) |
Aim for the larger platform values.
Use for focused, must-complete decisions. Harmful when overused for non-blocking info. Drawers/sheets are better for secondary content and on mobile.
Required for every modal:
aria-labelledby/aria-describedbyInaccessible modals are a top accessibility failure.
| State type | Best pattern |
|---|---|
| Content loading | Skeleton screens (generally reduce perceived wait) |
| Short discrete actions | Spinner |
| No state at all | Never — worst possible option |
Caveat: A 2017 Viget study found skeletons performed worst on perceived duration in some conditions. The rule is: show structure for content loading, use a spinner for short discrete actions.
Based on Baymard's multi-year, 50+ site studies:
| Pattern | Best for |
|---|---|
| Load More + lazy-loading | Default; superior for most product lists |
| Pagination | Goal-driven look-up, bookmarking, SEO |
| Infinite scroll | Exploratory/inspirational feeds (Pinterest, image galleries) |
Infinite scroll "can be downright harmful" for goal-driven search — users lose their place, can't bookmark/compare, the footer becomes unreachable.
Provide: sorting, filtering, sticky headers, pagination or "load more." Responsive patterns: horizontal scroll with frozen first column, or card stacking on mobile.
| Type | Use for | Behavior |
|---|---|---|
| Toast/snackbar | Transient confirmations | Auto-dismiss |
| Banner | Persistent page-level status | Stays until dismissed |
| Inline | Contextual/field errors | Adjacent to source |
Never put critical, action-required info in an auto-dismissing toast.
Dan Saffer's model: trigger → rules → feedback → loops/modes.
Disney timing principles:
Always honor prefers-reduced-motion — disable or reduce non-essential animation for vestibular safety.
WCAG 2.2 SC 2.5.7: drag interactions must have a single-pointer (non-drag) alternative.
| Year | Pages with WCAG failures | Low-contrast text | Errors/page |
|---|---|---|---|
| 2025 | 94.8% | 79.1% | 51.0 |
| 2026 | (implied regression) | 83.9% | 56.1 |
The six issue types accounting for 96% of all errors:
AA-level additions designers must know:
Note: 4.1.1 Parsing was removed in WCAG 2.2.
Use native HTML elements first. They carry built-in roles, keyboard handling, and focus management.
"No ARIA is better than bad ARIA": pages with ARIA averaged ~34–41% more detected errors than pages without (WebAIM). ARIA adds semantics but never behavior — a div role="button" still requires manual keyboard handlers. Reserve ARIA for genuinely custom widgets (tabs, comboboxes, live regions).
Provide: logical tab order, visible focus indicators, skip links, managed focus in SPAs (move focus on route change, trap in modals, restore on close).
Test with multiple screen readers — they differ in behavior:
Automated tools (axe, Lighthouse, WAVE) catch only 30–40% of issues. Manual keyboard + screen-reader testing is mandatory.
~8% of men have a color-vision deficiency. Never rely on color alone — add icons, labels, patterns (WCAG SC 1.4.1 Use of Color).
Compliance can be met while still excluding people. Inclusive design treats accessibility as one outcome of a broader commitment.
| Phase | Methods |
|---|---|
| Generative/Discovery | User interviews, contextual inquiry, diary studies, JTBD |
| Evaluative | Usability testing (moderated/unmoderated), tree testing |
| IA | Card sorting (open/closed/hybrid), tree testing |
| Behavioral at scale | Analytics, heatmaps, session recordings (Hotjar, FullStory) |
| Quantitative UX | SUS, SUPR-Q, NPS |
A/B testing works for high-traffic, isolatable changes with proper statistical significance. Misused for low-traffic pages or as a substitute for qualitative "why."
SUS (System Usability Scale):
Cognitive laws (useful heuristics, not physics):
Nielsen's 10 Heuristics — most commonly violated in practice:
"A design system is a living, funded product with a roadmap & backlog, serving an ecosystem." (Nathan Curtis)
Components:
Primitives → Semantic/Alias → Component
blue-500: #3B82F6 color-action-primary button-bg-primary
color-text-primary
color-text-primary, not color-blue-500| Tool | Role |
|---|---|
| Style Dictionary | Transform design tokens into platform code |
| Tokens Studio | Figma-based token management |
| W3C DTCG format | Standardizing JSON ($value/$type) |
| Figma Variables | Primitives, semantic tokens, multi-mode collections |
| Storybook | Code-first component documentation |
| Zeroheight / Supernova | Design-first documentation |
Atoms → Molecules → Organisms → Templates → Pages (Brad Frost, 2013).
What holds: Systems-thinking, shared vocabulary that "UIs are interconnected hierarchical systems," templates/pages for testing real content.
What's outdated: The atom/molecule/organism taxonomy is "too fuzzy" and abstracts too early. Practitioners now recommend starting with a flat component hierarchy and letting structure emerge. Frost himself has moved "subatomic" — toward design tokens as the smallest unit.
| Model | Description |
|---|---|
| Solitary | One team builds for its own needs ("Overlords don't scale") |
| Centralized | Dedicated team makes and spreads decisions for other teams |
| Federated | Designers from multiple product teams decide together |
| Cyclical | Centralized team + federated contributor community (Jina Anne/Salesforce) |
Curtis's contribution principle: "central system team members can't make all the decisions… a system practice must model and foster a federated community."
Relevance heuristic for what belongs in the system: useful to 3 products → discuss; useful to 5 → it probably belongs.
"Every discussion about versioning design system outputs begins and ends with SemVer." (Curtis)
Library-level vs. component-level versioning:
Package tokens as a separate dependency so style can evolve independently of component APIs.
Distinguish:
Tools:
react-scanner for static component-instance analysis from codeTrack detach rate as a diagnostic — a rising detach rate signals a bug, missing variant, or unmet need, and should trigger investigation, not enforcement.
Atlassian's 6-step process: communicate intent → set a timeline → add docs notice → run deprecation commands → communicate again → delete.
Timeline guidance by audience:
Run enhanced + deprecated in parallel before removal in the next major version.
| Tool | Strengths | Weaknesses |
|---|---|---|
| v0 (Vercel) | React + Tailwind + shadcn/ui generation; best for dev iteration | Generic output without customization |
| Figma Make | Multi-screen prototypes, rapid concept exploration | Variable credits; can't iterate after manual edits |
| Stitch (ex-Galileo, Google Labs) | High-fidelity mockups, Figma export | Labs-only, no SLA, weak for production work |
Consistent verdict across reviewers: get you "80% of the way there," require human judgment for UX quality, frequently fail accessibility audits by default (always verify contrast manually). Treat as accelerators, not replacements. Tool volatility is high — don't over-commit to any single one.
Stage 1 — Fix cheap, high-impact accessibility failures (weeks 1–4): Run axe/Lighthouse/WAVE; manually fix the six WebAIM categories: contrast (4.5:1 / 3:1 AA), alt text, form labels, empty links/buttons, document language. Add visible focus styles and skip links. Verify keyboard operability of every interactive element.
Stage 2 — Standardize foundations as tokens (months 2–3):
Establish three-tier token system; implement dark mode via semantic re-pointing (no pure black, elevation by lightness); set max-width: 66ch and line-height: 1.5 on body; adopt 8pt grid; define button hierarchy + states + touch targets (≥44pt/48dp). Move to oklch() with sRGB fallbacks.
Stage 3 — Apply pattern evidence to your context (ongoing):
Top-aligned labels; inline-after-completion validation; skeletons for content loading, spinners for short actions; Load More/pagination for goal-driven lists, infinite scroll only for exploratory feeds; honor prefers-reduced-motion. Decide density deliberately (dense for pro tools, airy for consumer/onboarding).
Stage 4 — Operationalize the design system (quarter 2+): Adopt SemVer; pick a governance model (centralized to start, federate as contributors mature); define a deprecation process with an explicit window; measure adoption (coverage + usage).
Stage 5 — Pilot AI tooling without betting the system on it: Use for rapid prototyping and concept exploration; require a human accessibility/contrast pass before anything ships; re-evaluate tool choice quarterly.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 plugins ship this exact skill · first indexed Aug 12, 2026
3 skills in this plugin
/nextjs-patternsProduction-grade Next.js App Router patterns covering rendering strategy (RSC, PPR, Cache Components), data fetching (parallelization, Suspense, React cache), mutations (Server Actions, next-safe-action, Zod), authentication (Auth.js v5, DAL, JWT/session tradeoffs), state management (URL state, Zustand, Jotai), performance (images, fonts, bundle analysis, Turbopack), security (CVE-2025-29927, rate limiting, input validation), TypeScript patterns, testing (Vitest, Playwright), styling (Tailwind, CSS Modules), and deployment (Vercel vs self-hosting, Docker). Use for any Next.js App Router architecture, debugging, or implementation question./performance-optimizationProduction performance reference covering Python (profiling with py-spy/Scalene, GIL and free-threading in 3.13t/3.14t, NumPy/Pandas vectorization 100–740x wins, Numba/Cython/PyPy, asyncio best practices, ASGI vs WSGI), Next.js/TypeScript (Core Web Vitals, RSC bundle discipline, PPR/Cache Components, App Router caching layers, Turbopack, DB pooling), and Azure cloud (compute cold starts, ACA/KEDA scale-to-zero, messaging service selection, Cosmos DB vs PostgreSQL, Redis ConnectionMultiplexer, Front Door CDN/WAF, VMSS autoscale, cost tiers). Use when diagnosing or fixing performance bottlenecks in Python services, Next.js apps, or Azure infrastructure.Other plugins' skills for the same job
npx claudepluginhub theviziusgroup/vibe-engineering-skills --plugin frontend-design