Skillsbench web-interface-guidelines
Vercel's comprehensive UI guidelines for building accessible, performant web interfaces. Use this skill when reviewing or building UI components for compliance with best practices around accessibility, performance, animations, and visual stability.
install
source · Clone the upstream repo
git clone https://github.com/benchflow-ai/skillsbench
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/benchflow-ai/skillsbench "$T" && mkdir -p ~/.claude/skills && cp -r "$T/tasks/fix-visual-stability/environment/skills/web-interface-guidelines" ~/.claude/skills/benchflow-ai-skillsbench-web-interface-guidelines && rm -rf "$T"
manifest:
tasks/fix-visual-stability/environment/skills/web-interface-guidelines/SKILL.mdsource content
Web Interface Guidelines
Review UI code for compliance with Vercel's web interface standards.
Quick Reference - Visual Stability
| Issue | Rule |
|---|---|
| Images without dimensions | needs explicit and (prevents CLS) |
| Font loading flash | Critical fonts: with |
| Large lists | Virtualize lists >50 items () |
| Layout reads in render | No , in render path |
Full Rules
Images
needs explicit<img>
andwidth
(prevents CLS)height- Below-fold images:
loading="lazy" - Above-fold critical images:
orpriorityfetchpriority="high"
Performance
- Large lists (>50 items): virtualize (
,virtua
)content-visibility: auto - No layout reads in render (
,getBoundingClientRect
,offsetHeight
,offsetWidth
)scrollTop - Batch DOM reads/writes; avoid interleaving
- Add
for CDN/asset domains<link rel="preconnect"> - Critical fonts:
with<link rel="preload" as="font">font-display: swap
Accessibility
- Icon-only buttons need
aria-label - Form controls need
or<label>aria-label - Interactive elements need keyboard handlers (
/onKeyDown
)onKeyUp
for actions,<button>
/<a>
for navigation (not<Link>
)<div onClick>- Images need
(oralt
if decorative)alt=""
Focus States
- Interactive elements need visible focus:
or equivalentfocus-visible:ring-* - Never
/outline-none
without focus replacementoutline: none - Use
over:focus-visible
(avoid focus ring on click):focus
Animation
- Honor
(provide reduced variant or disable)prefers-reduced-motion - Animate
/transform
only (compositor-friendly)opacity - Never
—list properties explicitlytransition: all
Forms
- Inputs need
and meaningfulautocompletename - Use correct
(type
,email
,tel
,url
) andnumberinputmode - Never block paste (
+onPaste
)preventDefault - Labels clickable (
or wrapping control)htmlFor
Content Handling
- Text containers handle long content:
,truncate
, orline-clamp-*break-words - Flex children need
to allow text truncationmin-w-0 - Handle empty states—don't render broken UI for empty strings/arrays
Anti-patterns (flag these)
oruser-scalable=no
disabling zoommaximum-scale=1transition: all
without focus-visible replacementoutline-none- Images without dimensions
- Large arrays
without virtualization.map() - Form inputs without labels
- Icon buttons without
aria-label