ui-design

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

UI Design Fundamentals

UI设计基础

The definitive guide for building production-grade web interfaces. Covers the full stack of design decisions from layout to motion.
构建生产级Web界面的权威指南,覆盖从布局到动效的全链路设计决策。

WHEN To Use

适用场景

  • Designing new UI components or pages
  • Building landing pages, dashboards, or applications
  • Reviewing code for design quality
  • Creating distinctive interfaces that avoid generic aesthetics
  • Implementing accessibility requirements
  • 设计新的UI组件或页面
  • 构建落地页、仪表盘或应用程序
  • 审核代码的设计质量
  • 打造避免通用审美的差异化界面
  • 落实无障碍相关要求

KEYWORDS

关键词

ui design, web design, layout, typography, color palette, spacing, visual hierarchy, responsive design, accessibility, motion design, component design, design tokens, frontend, css, tailwind
ui design, web design, layout, typography, color palette, spacing, visual hierarchy, responsive design, accessibility, motion design, component design, design tokens, frontend, css, tailwind

Installation

安装

OpenClaw / Moltbot / Clawbot

OpenClaw / Moltbot / Clawbot

bash
npx clawhub@latest install ui-design

bash
npx clawhub@latest install ui-design

Design Philosophy

设计理念

The 80/20 of Design Quality

设计质量的二八法则

FactorImpactTime Investment
Typography40%Choose 1-2 fonts well
Spacing25%Use consistent scale
Color20%Limit palette, ensure contrast
Everything else15%Shadows, borders, motion
Focus on typography and spacing first. They're 65% of perceived quality.
因素影响占比时间投入
排版40%选好1-2种字体即可
间距25%使用统一的间距尺度
色彩20%限制调色板数量,确保对比度
其他所有因素15%阴影、边框、动效
优先关注排版和间距,它们占用户感知质量的65%。

Commit to a Direction

明确设计方向

Mediocrity is forgettable. Pick an extreme:
DirectionCharacteristicsUse When
Brutally MinimalStark, essential, nothing extraDeveloper tools, productivity
Luxury/RefinedPremium, subtle eleganceHigh-end products, fashion
PlayfulFun, bright, approachableConsumer apps, games
EditorialType-forward, grid-basedContent sites, magazines
IndustrialFunction-forward, robustB2B, enterprise

平庸的设计毫无记忆点,选择一个极致的风格方向:
方向特点适用场景
极致极简直白、核心优先,无多余元素开发者工具、生产力工具
精致奢华高级感、微妙的优雅高端产品、时尚相关
活泼趣味有趣、明亮、友好消费级应用、游戏
编辑风排版优先、基于网格内容站点、杂志
工业风功能优先、硬朗B2B、企业级产品

Layout

布局

Grid vs Flexbox Decision

Grid与Flexbox选择指南

Layout NeedToolWhy
Page-level structureCSS Grid (
grid-template-areas
)
Named regions, explicit control
Navigation barsFlexboxSingle-axis,
gap
spacing
Card gridsGrid (
auto-fill
/
auto-fit
)
Responsive without media queries
CenteringGrid (
place-items: center
)
Shortest, most reliable
Sidebar + contentGrid (
250px 1fr
)
Fixed + fluid
Stacking/overlapsGrid +
grid-area: 1/1
No
position: absolute
needed
布局需求工具原因
页面级结构CSS Grid (
grid-template-areas
)
命名区域,显式可控
导航栏Flexbox单轴布局,
gap
属性方便控制间距
卡片网格Grid (
auto-fill
/
auto-fit
)
无需媒体查询即可实现响应式
元素居中Grid (
place-items: center
)
最简洁可靠的实现方式
侧边栏+内容Grid (
250px 1fr
)
固定宽度+自适应宽度组合
堆叠/重叠效果Grid +
grid-area: 1/1
无需使用
position: absolute

Container Strategy

容器策略

css
/* Standard content width */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 3rem);
}

/* Full-bleed with contained content */
.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
css
/* Standard content width */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 3rem);
}

/* Full-bleed with contained content */
.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

Common Layout Mistakes

常见布局错误

MistakeProblemFix
Mixing container widthsInconsistent alignmentUse single
max-w-*
value
Content behind fixed navbarHidden contentAdd
pt-[navbar-height]
No mobile paddingEdge-to-edge textAdd
px-4
minimum
Centered everythingWeak hierarchyLeft-align body text

错误问题修复方案
混合使用不同容器宽度对齐不一致使用统一的
max-w-*
内容被固定导航栏遮挡内容隐藏添加
pt-[navbar-height]
移动端无内边距文本贴边至少添加
px-4
所有内容居中视觉层级弱正文文本左对齐

Typography

排版

Typography carries 90% of a design's personality.
排版决定了设计90%的个性。

Font Pairing by Context

不同场景的字体搭配

ContextDisplay FontBody FontExample
EditorialHigh-contrast serifNeutral humanistPlayfair + Source Sans
SaaSGeometric sansMatching sansDM Sans + DM Mono
LuxuryThin modern serifElegant sansCormorant + Jost
DeveloperMonospace displayMonospace bodyJetBrains Mono + IBM Plex
PlayfulRounded/quirkyClean readableNunito + Outfit
场景展示字体正文字体示例
编辑风高对比度衬线字体中立人文主义无衬线Playfair + Source Sans
SaaS几何无衬线同系列无衬线DM Sans + DM Mono
奢华风细款现代衬线优雅无衬线Cormorant + Jost
开发者工具等宽展示字体等宽正文字体JetBrains Mono + IBM Plex
活泼风圆润/独特风格清晰易读Nunito + Outfit

Type Scale (1.25 ratio)

字体尺度(1.25倍率)

css
--text-xs: 0.64rem;   /* 10px - captions */
--text-sm: 0.8rem;    /* 13px - secondary */
--text-base: 1rem;    /* 16px - body */
--text-lg: 1.25rem;   /* 20px - lead */
--text-xl: 1.563rem;  /* 25px - h4 */
--text-2xl: 1.953rem; /* 31px - h3 */
--text-3xl: 2.441rem; /* 39px - h2 */
--text-4xl: 3.052rem; /* 49px - h1 */
css
--text-xs: 0.64rem;   /* 10px - captions */
--text-sm: 0.8rem;    /* 13px - secondary */
--text-base: 1rem;    /* 16px - body */
--text-lg: 1.25rem;   /* 20px - lead */
--text-xl: 1.563rem;  /* 25px - h4 */
--text-2xl: 1.953rem; /* 31px - h3 */
--text-3xl: 2.441rem; /* 39px - h2 */
--text-4xl: 3.052rem; /* 49px - h1 */

Typography Rules

排版规则

RuleValueWhy
Minimum body size16pxBelow is hard to read
Body line-height1.5-1.75Improves readability
Heading line-height1.1-1.2Tighter for large text
Line length60-75 charactersOptimal reading
Paragraph spacing1.5emClear separation
规则取值原因
正文字号最小值16px小于该值难以阅读
正文行高1.5-1.75提升可读性
标题行高1.1-1.2大文本行高更紧凑
行长度60-75字符最优阅读长度
段落间距1.5em清晰区隔段落

Typography Mistakes

常见排版错误

MistakeProblemFix
System fonts onlyGeneric lookUse Google Fonts or variable fonts
Too many fontsVisual chaosMax 2 families
Weak weight contrastPoor hierarchyBold headings (600+), regular body
Long linesHard to readAdd
max-w-prose
(65ch)

错误问题修复方案
仅使用系统字体外观普通使用Google Fonts或可变字体
字体数量过多视觉混乱最多使用2种字体系列
字重对比度弱层级差标题使用粗体(600+),正文使用常规字重
行长度过长难以阅读添加
max-w-prose
(65ch)限制

Color

色彩

Building a Palette

构建调色板

Every palette needs five functional roles:
RolePurposeUsage
PrimaryBrand identityButtons, links, active states
NeutralText, backgroundsBody text, cards, dividers
AccentSecondary actionsTags, badges, highlights
SemanticFeedbackSuccess/warning/error states
SurfaceLayered backgroundsCards, modals, overlays
每个调色板都需要五类功能色:
角色用途用法
主色品牌标识按钮、链接、激活态
中性色文本、背景正文、卡片、分割线
强调色次要操作标签、徽章、高亮
语义色反馈提示成功/警告/错误状态
表面色分层背景卡片、模态框、遮罩层

Surface Layering (Dark Mode)

表面分层(深色模式)

Create depth through lightness, not shadows:
css
:root {
  --surface-0: hsl(220 15% 8%);   /* page background */
  --surface-1: hsl(220 15% 12%);  /* card */
  --surface-2: hsl(220 15% 16%);  /* raised element */
  --surface-3: hsl(220 15% 20%);  /* popover/modal */
}
通过明度而非阴影创建层次感:
css
:root {
  --surface-0: hsl(220 15% 8%);   /* page background */
  --surface-1: hsl(220 15% 12%);  /* card */
  --surface-2: hsl(220 15% 16%);  /* raised element */
  --surface-3: hsl(220 15% 20%);  /* popover/modal */
}

Contrast Requirements (WCAG)

对比度要求(WCAG)

Text SizeMinimum RatioEnhanced (AAA)
Normal text (<18px)4.5:17:1
Large text (≥18px bold, ≥24px)3:14.5:1
UI components3:1
文本大小最小对比度增强级(AAA)
普通文本(<18px)4.5:17:1
大文本(≥18px粗体,≥24px)3:14.5:1
UI组件3:1

Color Mistakes

常见色彩错误

MistakeProblemFix
Purple gradient on white"AI aesthetic" clichéUse intentional brand colors
Low contrast textAccessibility failTest with contrast checker
Color-only indicatorsColorblind users excludedAdd icons/text
Too many colorsVisual noise3-5 colors maximum
Light gray text on whiteUnreadable
slate-600
minimum

错误问题修复方案
白色背景上的紫色渐变俗套的「AI审美」使用符合品牌定位的专属色彩
低对比度文本无障碍不达标使用对比度检查工具测试
仅用颜色传递信息色盲用户无法识别搭配图标/文本说明
色彩过多视觉噪音最多使用3-5种颜色
白色背景上的浅灰色文本难以阅读最低使用
slate-600
级别的灰度

Spacing

间距

8px Base Unit Scale

8px基准单位尺度

css
--space-1: 0.25rem;  /* 4px - tight gaps */
--space-2: 0.5rem;   /* 8px - input padding */
--space-3: 0.75rem;  /* 12px - button padding */
--space-4: 1rem;     /* 16px - default spacing */
--space-6: 1.5rem;   /* 24px - section padding */
--space-8: 2rem;     /* 32px - section gaps */
--space-12: 3rem;    /* 48px - major breaks */
--space-16: 4rem;    /* 64px - page rhythm */
css
--space-1: 0.25rem;  /* 4px - tight gaps */
--space-2: 0.5rem;   /* 8px - input padding */
--space-3: 0.75rem;  /* 12px - button padding */
--space-4: 1rem;     /* 16px - default spacing */
--space-6: 1.5rem;   /* 24px - section padding */
--space-8: 2rem;     /* 32px - section gaps */
--space-12: 3rem;    /* 48px - major breaks */
--space-16: 4rem;    /* 64px - page rhythm */

Spacing Rules

间距规则

RuleImplementation
Use
gap
not margins
display: flex; gap: var(--space-4)
Consistent paddingSame values on all cards/sections
More space between groupsLess space within groups (Gestalt)
No arbitrary valuesOnly use scale tokens
规则实现方式
使用
gap
而非外边距
display: flex; gap: var(--space-4)
统一内边距所有卡片/区块使用相同的内边距值
组间间距大于组内间距符合格式塔分组原则
不使用任意数值仅使用尺度中定义的变量

Spacing Mistakes

常见间距错误

MistakeProblemFix
Arbitrary pixel valuesInconsistent rhythmUse spacing scale only
Margin on childrenMargin collapse bugsUse
gap
on parent
Equal spacing everywhereNo visual groupingMore between, less within
Tight mobile paddingCramped feelingMinimum
p-4
on mobile

错误问题修复方案
随意的像素值视觉节奏不一致仅使用定义好的间距尺度
子元素设置外边距边距折叠bug在父元素上使用
gap
所有位置间距相等无视觉分组组间间距大,组内间距小
移动端内边距过小界面拥挤移动端最小
p-4
内边距

Visual Hierarchy

视觉层级

Guide the eye through deliberate contrast.
通过刻意的对比度引导用户视线。

Hierarchy Techniques

层级实现技巧

TechniqueHowImpact
SizeHero 3-4x bodyImmediate focal point
WeightBold headings, regular bodyScannability
ColorPrimary vs mutedInformation layers
SpaceIsolation creates emphasisDraws attention
PositionTop-left anchors readingNatural flow
技巧实现方式效果
尺寸英雄文本字号是正文的3-4倍快速形成视觉焦点
字重标题加粗,正文常规提升可扫描性
色彩主色vs弱色调划分信息层级
留白孤立元素创造强调效果吸引注意力
位置左上角作为阅读锚点符合自然阅读流

Card Hierarchy Pattern

卡片层级模式

Eyebrow  ← xs, uppercase, muted color
Title    ← xl, semibold, primary color
Body     ← base, secondary color, 1.6 line-height
Action   ← spaced apart, mt-4 minimum

Eyebrow  ← xs, uppercase, muted color
Title    ← xl, semibold, primary color
Body     ← base, secondary color, 1.6 line-height
Action   ← spaced apart, mt-4 minimum

Responsive Design

响应式设计

Breakpoint Strategy

断点策略

BreakpointTargetKey Changes
< 640pxMobileSingle column, stacked nav, 44px touch targets
640-1024pxTabletTwo columns, collapsible sidebars
1024-1440pxDesktopFull layout, hover enabled
> 1440pxWideMax-width container, prevent ultra-wide lines
断点适配目标核心改动
< 640px移动端单列布局,导航堆叠,44px可点击区域
640-1024px平板端双列布局,可折叠侧边栏
1024-1440px桌面端完整布局,支持hover效果
> 1440px宽屏最大宽度容器,避免超宽行

Fluid Techniques

流体适配技巧

css
/* Fluid typography */
h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 3.5rem); }

/* Fluid spacing */
section { padding-block: clamp(2rem, 1rem + 4vw, 6rem); }

/* Intrinsic grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: var(--space-6);
}
css
/* Fluid typography */
h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 3.5rem); }

/* Fluid spacing */
section { padding-block: clamp(2rem, 1rem + 4vw, 6rem); }

/* Intrinsic grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: var(--space-6);
}

Responsive Mistakes

常见响应式错误

MistakeProblemFix
No viewport metaBroken mobileAdd
width=device-width
Fixed widthsOverflow on mobileUse
max-w-*
and
%
Tiny touch targetsFrustrating tapsMinimum 44x44px
Hidden horizontal scrollBroken layoutTest at 375px width

错误问题修复方案
缺少viewport元标签移动端展示异常添加
width=device-width
固定宽度移动端内容溢出使用
max-w-*
和百分比单位
可点击区域过小点击体验差最小44x44px的可点击区域
隐藏的横向滚动布局异常在375px宽度下测试

Accessibility

无障碍设计

Accessibility is not optional.
无障碍设计是必选项。

Critical Requirements

核心要求

RequirementImplementationStandard
Color contrast4.5:1 normal, 3:1 largeWCAG 2.1 AA
Keyboard navigationTab order matches visualWCAG 2.1.1
Focus indicatorsVisible
:focus-visible
ring
WCAG 2.4.7
Semantic HTML
<button>
,
<nav>
,
<main>
WCAG 1.3.1
Alt textDescriptive for imagesWCAG 1.1.1
Motion safety
prefers-reduced-motion
WCAG 2.3.3
Touch targets44×44px minimumWCAG 2.5.8
要求实现方式标准
色彩对比度普通文本4.5:1,大文本3:1WCAG 2.1 AA
键盘导航Tab顺序与视觉顺序一致WCAG 2.1.1
焦点指示器可见的
:focus-visible
外框
WCAG 2.4.7
语义化HTML
<button>
<nav>
<main>
等标签
WCAG 1.3.1
替代文本图片添加描述性alt文本WCAG 1.1.1
动效安全支持
prefers-reduced-motion
偏好
WCAG 2.3.3
可点击区域最小44×44pxWCAG 2.5.8

Focus Styles

焦点样式

css
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Remove default only if custom exists */
:focus:not(:focus-visible) {
  outline: none;
}
css
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Remove default only if custom exists */
:focus:not(:focus-visible) {
  outline: none;
}

Motion Safety

动效安全

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

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

Motion & Animation

动效与动画

Use motion to communicate, not decorate.
动效用做信息传递,而非装饰。

Timing Guidelines

时长指引

InteractionDurationEasing
Button hover150msease-out
Modal open250msease-out
Modal close200msease-in
Page transition300msease-in-out
Stagger delay50-80ms per item
Micro-feedback100msease-out
交互类型时长缓动函数
按钮hover150msease-out
模态框打开250msease-out
模态框关闭200msease-in
页面转场300msease-in-out
错开延迟每个元素50-80ms
微反馈100msease-out

Staggered Entrance

错落入场效果

css
.item {
  opacity: 0;
  translate: 0 1rem;
  animation: reveal 0.5s ease-out forwards;
}
.item:nth-child(1) { animation-delay: 0ms; }
.item:nth-child(2) { animation-delay: 60ms; }
.item:nth-child(3) { animation-delay: 120ms; }

@keyframes reveal {
  to { opacity: 1; translate: 0 0; }
}
css
.item {
  opacity: 0;
  translate: 0 1rem;
  animation: reveal 0.5s ease-out forwards;
}
.item:nth-child(1) { animation-delay: 0ms; }
.item:nth-child(2) { animation-delay: 60ms; }
.item:nth-child(3) { animation-delay: 120ms; }

@keyframes reveal {
  to { opacity: 1; translate: 0 0; }
}

Motion Mistakes

常见动效错误

MistakeProblemFix
Animating width/heightPerformance hitUse
transform
only
> 500ms durationFeels sluggish150-300ms for most
Motion everywhereOverwhelmingFocus on entrances/exits
No reduced-motionAccessibility failAlways check preference

错误问题修复方案
动画修改宽高性能损耗仅使用
transform
属性
时长超过500ms反应迟缓大多数动效控制在150-300ms
到处都加动效过于杂乱仅聚焦于入场/退场动效
不支持减少动效偏好无障碍不达标始终检查用户动效偏好

Component States

组件状态

Every interactive element needs clear states.
StateVisual Treatment
DefaultBase styling
HoverSubtle background/shadow shift
Active/PressedSlight inset, reduced shadow
FocusHigh-visibility ring
Disabled50% opacity,
not-allowed
cursor
LoadingSpinner or skeleton
每个交互元素都需要清晰的状态。
状态视觉处理
默认基础样式
Hover轻微的背景/阴影变化
激活/按下轻微内凹,阴影减少
聚焦高可见度外框
禁用50%透明度,
not-allowed
光标
加载中加载动画或骨架屏

Button Example

按钮示例

css
.btn {
  transition: all 150ms ease-out;
}
.btn:hover {
  background: var(--color-primary-600);
}
.btn:active {
  transform: scale(0.98);
}
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

css
.btn {
  transition: all 150ms ease-out;
}
.btn:hover {
  background: var(--color-primary-600);
}
.btn:active {
  transform: scale(0.98);
}
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

Design Tokens Architecture

设计令牌架构

Structure tokens in three layers:
css
/* Layer 1: Primitives */
--blue-500: oklch(0.55 0.2 250);
--gray-100: oklch(0.95 0.005 250);
--radius-md: 0.5rem;

/* Layer 2: Semantic */
--color-primary: var(--blue-500);
--color-surface: var(--gray-100);
--radius-button: var(--radius-md);

/* Layer 3: Component */
--btn-bg: var(--color-primary);
--btn-radius: var(--radius-button);
--btn-padding: var(--space-2) var(--space-4);
This allows theme switching by remapping Layer 2 only.

设计令牌分为三层结构:
css
/* Layer 1: Primitives */
--blue-500: oklch(0.55 0.2 250);
--gray-100: oklch(0.95 0.005 250);
--radius-md: 0.5rem;

/* Layer 2: Semantic */
--color-primary: var(--blue-500);
--color-surface: var(--gray-100);
--radius-button: var(--radius-md);

/* Layer 3: Component */
--btn-bg: var(--color-primary);
--btn-radius: var(--radius-button);
--btn-padding: var(--space-2) var(--space-4);
仅需重映射第二层即可实现主题切换。

Pre-Delivery Checklist

发布前检查清单

Typography

排版

  • Intentional font pairing (not system defaults)
  • Consistent type scale
  • Line length ≤ 75 characters
  • 16px minimum body text
  • 经过设计的字体搭配(非系统默认)
  • 统一的字体尺度
  • 行长度 ≤ 75字符
  • 正文字号最小16px

Color

色彩

  • Cohesive palette (3-5 colors)
  • WCAG contrast met (4.5:1 normal, 3:1 large)
  • Semantic colors defined
  • Dark mode tested (if applicable)
  • 统一的调色板(3-5种颜色)
  • 符合WCAG对比度要求(普通文本4.5:1,大文本3:1)
  • 定义好语义色
  • 测试过深色模式(如果适用)

Spacing

间距

  • Consistent rhythm using scale
  • No arbitrary pixel values
  • Proper mobile padding
  • 使用统一尺度实现一致的视觉节奏
  • 无任意像素值
  • 合适的移动端内边距

Hierarchy

层级

  • Clear visual flow
  • Primary action obvious
  • Information layered by importance
  • 清晰的视觉流
  • 主操作清晰可识别
  • 信息按重要性分层

Responsive

响应式

  • Mobile tested (375px)
  • No horizontal overflow
  • Touch targets ≥ 44px
  • 移动端测试(375px)
  • 无横向溢出
  • 可点击区域 ≥ 44px

Accessibility

无障碍

  • Keyboard navigable
  • Focus visible
  • Screen reader tested
  • Motion-safe
  • 支持键盘导航
  • 焦点可见
  • 屏幕阅读器测试通过
  • 动效安全

States

状态

  • Hover on all interactive elements
  • Focus-visible on all focusable
  • Loading states for async
  • Error states for forms
  • 所有交互元素有hover效果
  • 所有可聚焦元素有focus-visible效果
  • 异步操作有加载状态
  • 表单有错误状态

Performance

性能

  • Images optimized (WebP, srcset)
  • Fonts subset
  • Animations use
    transform
    /
    opacity

  • 图片优化(WebP、srcset)
  • 字体子集化
  • 动画使用
    transform
    /
    opacity

NEVER Do

绝对禁止的操作

  1. NEVER skip contrast checking — Test every text/background combination
  2. NEVER use color alone — Always pair with icons/text for meaning
  3. NEVER remove focus outlines — Unless replacing with visible alternative
  4. NEVER use arbitrary spacing — Stick to the scale
  5. NEVER animate layout properties — Only
    transform
    and
    opacity
  6. NEVER ignore reduced-motion — Always check the preference
  7. NEVER center everything — Left-align body text
  8. NEVER use tiny touch targets — 44px minimum
  9. NEVER use low-contrast text
    slate-600
    minimum on white
  10. NEVER use generic system fonts — Choose intentional typography

  1. 绝对不要跳过对比度检查 —— 测试所有文本/背景组合
  2. 绝对不要仅用颜色传递信息 —— 始终搭配图标/文本说明含义
  3. 绝对不要移除焦点外框 —— 除非替换为可见的自定义样式
  4. 绝对不要使用任意间距值 —— 遵守定义好的间距尺度
  5. 绝对不要对布局属性做动画 —— 仅使用
    transform
    opacity
  6. 绝对不要忽略减少动效偏好 —— 始终检查用户偏好设置
  7. 绝对不要所有内容都居中 —— 正文文本左对齐
  8. 绝对不要使用过小的可点击区域 —— 最小44px
  9. 绝对不要使用低对比度文本 —— 白色背景上最低使用
    slate-600
  10. 绝对不要使用通用系统字体 —— 选择经过设计的排版方案

Related Skills

相关技能

  • ui-ux-pro-max
    — Searchable design databases with CLI
  • frontend-design
    — Creative aesthetics, avoiding "AI slop"
  • theme-factory
    — Applying themes to artifacts
  • design-system-patterns
    — Token architecture and theming
  • ui-ux-pro-max
    — Searchable design databases with CLI
  • frontend-design
    — Creative aesthetics, avoiding "AI slop"
  • theme-factory
    — Applying themes to artifacts
  • design-system-patterns
    — Token architecture and theming