Web Interface Guidelines
Review UI code according to Vercel Web Interface Guidelines.
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 MB, ⌘ 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
/a11y - Deep accessibility analysis
/frontend-design - Frontend UI generation
/responsive - Responsive design review
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: excatt-superclaude-plusplus-web-design-guidelines3description: Web Interface Guidelines4---56# Web Interface Guidelines78Review UI code according to Vercel Web Interface Guidelines.910## Usage1112```bash13/web-design-guidelines src/components/Button.tsx14/web-design-guidelines "src/**/*.tsx"15/web-design-guidelines # prompt for file16```1718## Review Rules1920### Accessibility2122- Icon-only buttons require `aria-label`23- Form controls require `<label>` or `aria-label`24- Interactive elements require keyboard handlers (`onKeyDown`/`onKeyUp`)25- Use `<button>` for actions, `<a>`/`<Link>` for navigation (no `<div onClick>`)26- Images require `alt` (use `alt=""` for decorative)27- Decorative icons require `aria-hidden="true"`28- Async updates (toasts, validation) require `aria-live="polite"`29- Prefer semantic HTML over ARIA (`<button>`, `<a>`, `<label>`, `<table>`)30- Maintain heading hierarchy `<h1>`–`<h6>`; include skip link to main content31- Anchor headings require `scroll-margin-top`3233### Focus States3435- Interactive elements require visible focus: `focus-visible:ring-*` or equivalent36- Using `outline-none` / `outline: none` requires alternative focus indicator37- Use `:focus-visible` over `:focus` (prevents focus ring on click)38- Use `:focus-within` on compound controls for group focus3940### Forms4142- Inputs require `autocomplete` and meaningful `name`43- Use correct `type` (`email`, `tel`, `url`, `number`) and `inputmode`44- Never block paste (`onPaste` + `preventDefault`)45- Labels must be clickable (`htmlFor` or wrap control)46- Disable spellcheck for email, code, username (`spellCheck={false}`)47- Checkbox/Radio: label + control = single hit target (no dead zone)48- Submit button active until request starts; show spinner during request49- Errors shown inline next to field; focus first error on submit50- Placeholders end with `…` and show example pattern51- Use `autocomplete="off"` on non-auth fields (prevent password manager trigger)52- Warn on navigation with unsaved changes (`beforeunload` or router guard)5354### Animation5556- Respect `prefers-reduced-motion` (provide reduced version or disable)57- Animate only `transform`/`opacity` (compositor-friendly)58- Forbid `transition: all`—list properties explicitly59- Set correct `transform-origin`60- SVG: transforms on `<g>` wrapper, `transform-box: fill-box; transform-origin: center`61- Animations must be interruptible—respond to user input during animation6263### Typography6465- Use `…` instead of `...`66- Use curly quotes `"` `"` instead of straight `"`67- Non-breaking spaces: `10 MB`, `⌘ K`, brand names68- Loading states end with `…`: `"Loading…"`, `"Saving…"`69- Numeric columns/comparisons: `font-variant-numeric: tabular-nums`70- Headings: `text-wrap: balance` or `text-pretty` (prevent widows)7172### Content Handling7374- Text containers handle long content: `truncate`, `line-clamp-*`, or `break-words`75- Flex children need `min-w-0` (allow text truncation)76- Handle empty states—no broken UI for empty strings/arrays77- User-generated content: expect short, average, very long inputs7879### Images8081- `<img>` requires explicit `width` and `height` (prevent CLS)82- Below-fold images: `loading="lazy"`83- Above-fold critical images: `priority` or `fetchpriority="high"`8485### Performance8687- Large lists (>50 items): virtualize (`virtua`, `content-visibility: auto`)88- Never read layout in render (`getBoundingClientRect`, `offsetHeight`, etc.)89- Batch DOM reads/writes; avoid interleaving90- Prefer uncontrolled inputs; controlled inputs must be cheap per keystroke91- Add `<link rel="preconnect">` for CDN/asset domains92- Critical fonts: `<link rel="preload" as="font">` with `font-display: swap`9394### Navigation & State9596- URL reflects state—filters, tabs, pagination, expanded panels in query params97- Links use `<a>`/`<Link>` (support Cmd/Ctrl+click, middle-click)98- Deep-link all state UI (consider nuqs etc. to sync URL when using `useState`)99- Destructive actions require confirmation modal or undo window—no instant execution100101### Touch & Interaction102103- `touch-action: manipulation` (prevent double-tap zoom delay)104- Set `-webkit-tap-highlight-color` intentionally105- Modals/drawers/sheets: `overscroll-behavior: contain`106- During drag: disable text selection, `inert` on dragged element107- Use `autoFocus` carefully—desktop only, single primary input; avoid on mobile108109### Safe Areas & Layout110111- Full-bleed layouts require `env(safe-area-inset-*)` for notch112- Prevent unwanted scrollbars: `overflow-x-hidden` on container, fix content overflow113- Prefer flex/grid over JS measurement114115### Dark Mode & Theming116117- Dark theme requires `color-scheme: dark` on `<html>` (fixes scrollbar, inputs)118- `<meta name="theme-color">` matches page background119- Native `<select>`: explicit `background-color` and `color` (Windows dark mode)120121### Locale & i18n122123- Dates/times: use `Intl.DateTimeFormat` instead of hardcoded format124- Numbers/currency: use `Intl.NumberFormat` instead of hardcoded format125- Language detection: `Accept-Language` / `navigator.languages` instead of IP126127### Hydration Safety128129- Input with `value` requires `onChange` (or use `defaultValue` for uncontrolled)130- Date/time rendering: prevent hydration mismatch (server vs client)131- Use `suppressHydrationWarning` only where truly needed132133### Hover & Interactive States134135- Buttons/links require `hover:` state (visual feedback)136- Interactive states increase contrast: hover/active/focus more visible than rest137138### Content & Copy139140- Active voice: "Install the CLI" not "The CLI will be installed"141- Title Case for headings/buttons (Chicago style)142- Numerals for counts: "8 deployments" not "eight"143- Specific button labels: "Save API Key" not "Continue"144- Error messages include fix/next step, not just problem145- Use second person; avoid first person146- Use `&` over "and" when space-constrained147148## Anti-patterns - Must Flag149150- `user-scalable=no` or `maximum-scale=1` (disables zoom)151- `onPaste` with `preventDefault`152- `transition: all`153- `outline-none` without focus-visible alternative154- Inline `onClick` navigation without `<a>`155- `<div>` or `<span>` with click handler (must use `<button>`)156- Images without dimensions157- Large array `.map()` without virtualization158- Form inputs without labels159- Icon buttons without `aria-label`160- Hardcoded date/number format (must use `Intl.*`)161- `autoFocus` without clear justification162163## AI Slop Detection - Hard Reject164165AI-generated UI that looks generic must be flagged and reworked. These patterns indicate low-effort AI output:166167### Visual Anti-patterns (flag any occurrence)168- Purple-to-blue gradient as primary accent with no brand justification169- 3-column icon grid layout (icon + heading + paragraph x3)170- Icons inside colored circles as section markers171- "Hero image + 3 feature cards" cookie-cutter layout172- Generic stock photo placeholders or AI-generated hero images173- Overly uniform border-radius on everything (all-8px syndrome)174- Gradient CTA buttons floating in white space175- Cookie-cutter testimonial carousel (avatar + quote + name)176- Decorative blobs/mesh gradients as background filler177- "Dashboard" UI with identical stat cards in a row178179### Hard Rejection Criteria (immediate rework required)180- Layout is indistinguishable from a SaaS landing page template181- Color palette matches default Tailwind purple/indigo/violet without customization182- Every section follows identical padding/spacing rhythm with no visual hierarchy183- Illustrations or icons are all from the same generic set without style adaptation184- Typography uses only one weight with no clear heading/body distinction185- No brand-specific design tokens — all values are framework defaults186- Page could belong to any product — zero domain-specific visual identity187188## Output Format189190Group by file. Use `file:line` format (VS Code clickable). Concise findings.191192```text193## src/Button.tsx194195src/Button.tsx:42 - icon button missing aria-label196src/Button.tsx:18 - input lacks label197src/Button.tsx:55 - animation missing prefers-reduced-motion198src/Button.tsx:67 - transition: all → list properties199200## src/Modal.tsx201202src/Modal.tsx:12 - missing overscroll-behavior: contain203src/Modal.tsx:34 - "..." → "…"204205## src/Card.tsx206207✓ pass208```209210State issue + location. Skip explanation if fix is obvious. No preamble.211212## Related Skills213214- `/react-best-practices` - React/Next.js performance optimization215- `/a11y` - Deep accessibility analysis216- `/frontend-design` - Frontend UI generation217- `/responsive` - Responsive design review218219---220> Converted and distributed by [TomeVault](https://tomevault.io/claim/excatt) — claim your Tome and manage your conversions.221<!-- tomevault:4.0:skill_md:2026-04-11 -->