agentleFS
excattexcatt/superclaude-plusplus/skills/web-design-guidelines/SKILL.md

web-design-guidelines

Skill14 starsChanged 37 days agoMITView on GitHub

UI code review against Vercel's Web Interface Guidelines (100+ accessibility/performance/UX rules). Use for UI, a11y, or UX reviews of frontend code — not for backend or API design.

176 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use canvas-procedural-animation, intelligent-routing and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • LinHao-citySkill

    canvas-procedural-animation

    Use p5.js/canvas for local procedural character effects: particles, weather, squash/stretch, walk cycles, and environmental motion.

    Also in 5 projects that use this

  • SKB3002Skill

    intelligent-routing

    Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.

    Also in 5 projects that use this

  • VercelSkill

    vercel-optimize

    Use for Vercel cost and performance optimization on deployed projects, especially Next.js, SvelteKit, Nuxt, and limited Astro apps. Collect Vercel metrics, usage, project config, and code scan results first; investigate only metric-backed candidates; produce ranked recommendations grounded in verified files and version-aware Vercel/framework docs. Trigger for Vercel bill reduction, slow or expensive routes, caching opportunities, Function Invocations, Build Minutes, Fast Data Transfer, Core Web Vitals, Bot Management, Fluid compute, or cost breakdown requests.

    Also in 15 projects that use this

  • thongdn-itSkill

    nuqs

    nuqs (type-safe URL query state) best practices for Next.js applications. This skill should be used when writing, reviewing, or refactoring code that uses nuqs for URL state management. Triggers on tasks involving useQueryState, useQueryStates, search params, URL state, query parameters, nuqs parsers, or Next.js routing with state.

    Also in 4 projects that use this

  • LinHao-citySkill

    pose-library-design

    Design reusable 2D character pose libraries, action cycles, and expression states for data-driven animation.

    Also in 4 projects that use this

  • stophobiaSkill

    surprise-me

    Create a delightful, unexpected "wow" experience for the user by dynamically discovering and creatively combining other enabled skills. Triggers when the user says "surprise me" or any request expressing a desire for an unexpected creative showcase. Also triggers when the user is bored, wants inspiration, or asks for "something interesting".

    Also in 4 projects that use this

  • +2 more from LinHao-city

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. 0 are common, 6 are distinctive, and 14 are very specific to this project.

  • 0

    Common

    Most of the 173 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 14

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do NOT use for: backend code, API design, database

    line 29
  2. Very specific:

    Use <button> for actions, <a>/<Link> for navigation (no <div onClick>)

    line 46
  3. Very specific:

    Prefer semantic HTML over ARIA (<button>, <a>, <label>, <table>)

    line 50
  4. Very specific:

    Use :focus-visible over :focus (prevents focus ring on click)

    line 58
  5. Very specific:

    Use :focus-within on compound controls for group focus

    line 59
  6. Very specific:

    Use correct type (email, tel, url, number) and inputmode

    line 64
  7. Very specific:

    Never block paste (onPaste + preventDefault)

    line 65
  8. Very specific:

    Use autocomplete="off" on non-auth fields (prevent password manager trigger)

    line 72
  9. Very specific:

    Use … instead of ...

    line 86
  10. Very specific:

    Use curly quotes " " instead of straight "

    line 87
  11. Very specific:

    Never read layout in render (getBoundingClientRect, offsetHeight, etc.)

    line 109
  12. Distinctive:

    Prefer uncontrolled inputs.

    line 111
  13. Very specific:

    Add <link rel="preconnect"> for CDN/asset domains

    line 112
  14. Very specific:

    Use autoFocus carefully—desktop only, single primary input.

    line 128
  15. Distinctive:

    Prefer flex/grid over JS measurement

    line 134
  16. Very specific:

    Use suppressHydrationWarning only where truly needed

    line 152
  17. Distinctive:

    Use second person; avoid first person

    line 166
  18. Very specific:

    Use & over "and" when space-constrained

    line 167
  19. Distinctive:

    Every section follows identical padding/spacing rhythm with no visual hierarchy

    line 203
  20. Distinctive:

    No brand-specific design tokens — all values are framework defaults

    line 206

“Common” is measured: kept by at least 6 in 10 of the 173 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Web Interface Guidelines

Review UI code according to Vercel Web Interface Guidelines.

When to Use

Use proactively when:

  • UI code review requested
  • Accessibility (a11y) check requested
  • Design audit requested
  • UX review requested
  • Best practices check requested

Triggers: review UI, check accessibility, audit design, review UX, check best practices, UI review, accessibility check, design review, UX review, web guidelines, a11y check

Do NOT use for: backend code, API design, database

Usage

/web-design-guidelines src/components/Button.tsx
/web-design-guidelines "src/**/*.tsx"
/web-design-guidelines                          # prompt for file

Review Rules

Accessibility

  • Icon-only buttons require aria-label
  • Form controls require <label> or aria-label
  • Interactive elements require keyboard handlers (onKeyDown/onKeyUp)
  • Use <button> for actions, <a>/<Link> for navigation (no <div onClick>)
  • Images require alt (use alt="" for decorative)
  • Decorative icons require aria-hidden="true"
  • Async updates (toasts, validation) require aria-live="polite"
  • Prefer semantic HTML over ARIA (<button>, <a>, <label>, <table>)
  • Maintain heading hierarchy <h1>–<h6>; include skip link to main content
  • Anchor headings require scroll-margin-top

Focus States

  • Interactive elements require visible focus: focus-visible:ring-* or equivalent
  • Using outline-none / outline: none requires alternative focus indicator
  • Use :focus-visible over :focus (prevents focus ring on click)
  • Use :focus-within on compound controls for group focus

Forms

  • Inputs require autocomplete and meaningful name
  • Use correct type (email, tel, url, number) and inputmode
  • Never block paste (onPaste + preventDefault)
  • Labels must be clickable (htmlFor or wrap control)
  • Disable spellcheck for email, code, username (spellCheck={false})
  • Checkbox/Radio: label + control = single hit target (no dead zone)
  • Submit button active until request starts; show spinner during request
  • Errors shown inline next to field; focus first error on submit
  • Placeholders end with … and show example pattern
  • Use autocomplete="off" on non-auth fields (prevent password manager trigger)
  • Warn on navigation with unsaved changes (beforeunload or router guard)

Animation

  • Respect prefers-reduced-motion (provide reduced version or disable)
  • Animate only transform/opacity (compositor-friendly)
  • Forbid transition: all—list properties explicitly
  • Set correct transform-origin
  • SVG: transforms on <g> wrapper, transform-box: fill-box; transform-origin: center
  • Animations must be interruptible—respond to user input during animation

Typography

  • Use … instead of ...
  • Use curly quotes " " instead of straight "
  • Non-breaking spaces: 10&nbsp;MB, ⌘&nbsp;K, brand names
  • Loading states end with …: "Loading…", "Saving…"
  • Numeric columns/comparisons: font-variant-numeric: tabular-nums
  • Headings: text-wrap: balance or text-pretty (prevent widows)

Content Handling

  • Text containers handle long content: truncate, line-clamp-*, or break-words
  • Flex children need min-w-0 (allow text truncation)
  • Handle empty states—no broken UI for empty strings/arrays
  • User-generated content: expect short, average, very long inputs

Images

  • <img> requires explicit width and height (prevent CLS)
  • Below-fold images: loading="lazy"
  • Above-fold critical images: priority or fetchpriority="high"

Performance

  • Large lists (>50 items): virtualize (virtua, content-visibility: auto)
  • Never read layout in render (getBoundingClientRect, offsetHeight, etc.)
  • Batch DOM reads/writes; avoid interleaving
  • Prefer uncontrolled inputs; controlled inputs must be cheap per keystroke
  • Add <link rel="preconnect"> for CDN/asset domains
  • Critical fonts: <link rel="preload" as="font"> with font-display: swap

Navigation & State

  • URL reflects state—filters, tabs, pagination, expanded panels in query params
  • Links use <a>/<Link> (support Cmd/Ctrl+click, middle-click)
  • Deep-link all state UI (consider nuqs etc. to sync URL when using useState)
  • Destructive actions require confirmation modal or undo window—no instant execution

Touch & Interaction

  • touch-action: manipulation (prevent double-tap zoom delay)
  • Set -webkit-tap-highlight-color intentionally
  • Modals/drawers/sheets: overscroll-behavior: contain
  • During drag: disable text selection, inert on dragged element
  • Use autoFocus carefully—desktop only, single primary input; avoid on mobile

Safe Areas & Layout

  • Full-bleed layouts require env(safe-area-inset-*) for notch
  • Prevent unwanted scrollbars: overflow-x-hidden on container, fix content overflow
  • Prefer flex/grid over JS measurement

Dark Mode & Theming

  • Dark theme requires color-scheme: dark on <html> (fixes scrollbar, inputs)
  • <meta name="theme-color"> matches page background
  • Native <select>: explicit background-color and color (Windows dark mode)

Locale & i18n

  • Dates/times: use Intl.DateTimeFormat instead of hardcoded format
  • Numbers/currency: use Intl.NumberFormat instead of hardcoded format
  • Language detection: Accept-Language / navigator.languages instead of IP

Hydration Safety

  • Input with value requires onChange (or use defaultValue for uncontrolled)
  • Date/time rendering: prevent hydration mismatch (server vs client)
  • Use suppressHydrationWarning only where truly needed

Hover & Interactive States

  • Buttons/links require hover: state (visual feedback)
  • Interactive states increase contrast: hover/active/focus more visible than rest

Content & Copy

  • Active voice: "Install the CLI" not "The CLI will be installed"
  • Title Case for headings/buttons (Chicago style)
  • Numerals for counts: "8 deployments" not "eight"
  • Specific button labels: "Save API Key" not "Continue"
  • Error messages include fix/next step, not just problem
  • Use second person; avoid first person
  • Use & over "and" when space-constrained

Anti-patterns - Must Flag

  • user-scalable=no or maximum-scale=1 (disables zoom)
  • onPaste with preventDefault
  • transition: all
  • outline-none without focus-visible alternative
  • Inline onClick navigation without <a>
  • <div> or <span> with click handler (must use <button>)
  • Images without dimensions
  • Large array .map() without virtualization
  • Form inputs without labels
  • Icon buttons without aria-label
  • Hardcoded date/number format (must use Intl.*)
  • autoFocus without clear justification

AI Slop Detection - Hard Reject

AI-generated UI that looks generic must be flagged and reworked. These patterns indicate low-effort AI output:

Visual Anti-patterns (flag any occurrence)

  • Purple-to-blue gradient as primary accent with no brand justification
  • 3-column icon grid layout (icon + heading + paragraph x3)
  • Icons inside colored circles as section markers
  • "Hero image + 3 feature cards" cookie-cutter layout
  • Generic stock photo placeholders or AI-generated hero images
  • Overly uniform border-radius on everything (all-8px syndrome)
  • Gradient CTA buttons floating in white space
  • Cookie-cutter testimonial carousel (avatar + quote + name)
  • Decorative blobs/mesh gradients as background filler
  • "Dashboard" UI with identical stat cards in a row

Hard Rejection Criteria (immediate rework required)

  • Layout is indistinguishable from a SaaS landing page template
  • Color palette matches default Tailwind purple/indigo/violet without customization
  • Every section follows identical padding/spacing rhythm with no visual hierarchy
  • Illustrations or icons are all from the same generic set without style adaptation
  • Typography uses only one weight with no clear heading/body distinction
  • No brand-specific design tokens — all values are framework defaults
  • Page could belong to any product — zero domain-specific visual identity

Output Format

Group by file. Use file:line format (VS Code clickable). Concise findings.

## src/Button.tsx

src/Button.tsx:42 - icon button missing aria-label
src/Button.tsx:18 - input lacks label
src/Button.tsx:55 - animation missing prefers-reduced-motion
src/Button.tsx:67 - transition: all → list properties

## src/Modal.tsx

src/Modal.tsx:12 - missing overscroll-behavior: contain
src/Modal.tsx:34 - "..." → "…"

## src/Card.tsx

✓ pass

State issue + location. Skip explanation if fix is obvious. No preamble.

Related Skills

  • /react-best-practices - React/Next.js performance optimization
  • /frontend-design - Frontend UI generation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.