anthropic-ui-skills
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAnthropic UI Skills
Anthropic UI 设计规范
Opinionated constraints for building Anthropic-style interfaces with AI agents.
为构建Anthropic风格界面(适配AI Agent)制定的约束性设计规范。
When to Apply
适用场景
Reference these guidelines when:
- Building light-mode interfaces
- Creating Anthropic-inspired design systems
- Implementing UIs with Inter font and 4px grid
以下场景请参考本规范:
- 构建浅色模式界面时
- 创建Anthropic风格的设计系统时
- 采用Inter字体和4px网格实现UI时
Colors
颜色
- SHOULD use light backgrounds for primary surfaces
- MUST use as page background (
#ECE9E0)surface-base - SHOULD limit color palette to 8 distinct colors
- MUST maintain text contrast ratio of at least 4.5:1 for accessibility
- 主界面背景应使用浅色
- 页面背景必须使用(对应
#ECE9E0)surface-base - 颜色调色板应限制为8种不同颜色
- 为保障无障碍性,文本对比度必须至少达到4.5:1
Semantic Tokens
语义化令牌
| Token | HEX | RGB | Usage |
|---|---|---|---|
| #ECE9E0 | rgb(236,233,224) | Page background |
| #DBD1C0 | rgb(219,209,192) | Cards, modals, raised surfaces |
| #0F0F10 | rgb(15,15,16) | Overlays, tooltips, dropdowns |
| #625F59 | rgb(98,95,89) | Headings, body text |
| #9F9F9C | rgb(159,159,156) | Secondary, muted text |
| #454036 | rgb(69,64,54) | Additional text |
| 令牌 | 十六进制值 | RGB值 | 用途 |
|---|---|---|---|
| #ECE9E0 | rgb(236,233,224) | 页面背景 |
| #DBD1C0 | rgb(219,209,192) | 卡片、模态框、凸起界面 |
| #0F0F10 | rgb(15,15,16) | 遮罩、提示框、下拉菜单 |
| #625F59 | rgb(98,95,89) | 标题、正文文本 |
| #9F9F9C | rgb(159,159,156) | 次要、弱化文本 |
| #454036 | rgb(69,64,54) | 辅助文本 |
Typography
排版
- MUST use as primary font family
Inter - SHOULD use single font family for consistency
- MUST use /
68pxfor primary headings700 - MUST use /
33pxfor body textsemi_bold - SHOULD reduce font weights (currently 5 detected)
- MUST use for headings and
text-balancefor body texttext-pretty - SHOULD use for numeric data
tabular-nums - NEVER modify letter-spacing unless explicitly requested
- 必须以作为主要字体家族
Inter - 为保持一致性,应使用单一字体家族
- 一级标题必须使用/
68px字重700 - 正文文本必须使用/
33px字重semi_bold - 应减少字体字重数量(当前检测到5种)
- 标题必须使用,正文必须使用
text-balancetext-pretty - 数字数据应使用
tabular-nums - 除非明确要求,否则绝不能修改字间距
Text Styles
文本样式
| Style | Font | Size | Weight | Color | Count |
|---|---|---|---|---|---|
| Inter | 68px | 700 | #201F1D | 1 |
| Inter | 33px | semi_bold | #35312A | 1 |
| Inter | 23px | 500 | #403D37 | 1 |
| Inter | 21px | 400 | #3D362C | 1 |
| Inter | 21px | 400 | #3B352B | 1 |
| Inter | 20px | 400 | #494237 | 1 |
| Inter | 17px | 500 | #423F3B | 1 |
| Inter | 16px | 400 | #454036 | 1 |
| Inter | 14px | 500 | #3F3931 | 1 |
| Inter | 14px | 400 | #A2A3A0 | 1 |
| 样式 | 字体 | 字号 | 字重 | 颜色 | 数量 |
|---|---|---|---|---|---|
| Inter | 68px | 700 | #201F1D | 1 |
| Inter | 33px | semi_bold | #35312A | 1 |
| Inter | 23px | 500 | #403D37 | 1 |
| Inter | 21px | 400 | #3D362C | 1 |
| Inter | 21px | 400 | #3B352B | 1 |
| Inter | 20px | 400 | #494237 | 1 |
| Inter | 17px | 500 | #423F3B | 1 |
| Inter | 16px | 400 | #454036 | 1 |
| Inter | 14px | 500 | #3F3931 | 1 |
| Inter | 14px | 400 | #A2A3A0 | 1 |
Typography Reference
排版参考
Font Families:
- (used 16x)
Inter
Font Sizes: 10px, 11px, 14px, 16px, 17px, 20px, 21px, 23px, 33px, 68px
字体家族:
- (使用16次)
Inter
字号: 10px, 11px, 14px, 16px, 17px, 20px, 21px, 23px, 33px, 68px
Spacing
间距
- MUST use 4px grid for spacing
- SHOULD use spacing from scale: 3px, 4px, 5px, 6px
- SHOULD use 5px as default gap between elements
- NEVER use arbitrary spacing values (use design scale)
- SHOULD maintain consistent padding within containers
- 必须使用4px网格系统来设定间距
- 应使用以下间距刻度值:3px, 4px, 5px, 6px
- 元素间默认间距应设为5px
- 绝不能使用任意间距值(需遵循设计刻度)
- 容器内的内边距应保持一致
Borders
边框
- MUST use border-radius from scale: 3px, 15px
- SHOULD use 3px as default border-radius
- NEVER use arbitrary border-radius values (use design scale)
- SHOULD use subtle borders (1px) for element separation
- 必须使用以下圆角刻度值:3px, 15px
- 默认圆角应设为3px
- 绝不能使用任意圆角值(需遵循设计刻度)
- 应使用细微边框(1px)来分隔元素
Border Radius Reference
圆角参考
Scale: 3px, 15px
刻度: 3px, 15px
Layout
布局
- MUST design for 1920px base viewport width
- SHOULD use consistent element widths: 10px, 18px, 146px, 579px
- SHOULD maintain text-heavy layout with clear hierarchy
- NEVER use , use
h-screenfor full viewport heighth-dvh - MUST respect for fixed elements
safe-area-inset - SHOULD use for square elements instead of
size-*+w-*h-*
- 必须基于1920px基准视口宽度进行设计
- 应使用统一的元素宽度:10px, 18px, 146px, 579px
- 应保持以文本为主的布局,并具备清晰的层级结构
- 绝不能使用,需使用
h-screen来实现全屏视口高度h-dvh - 固定元素必须遵循安全区域规则
safe-area-inset - 方形元素应使用而非
size-*+w-*h-*
Detected Layout Patterns
检测到的布局模式
- Main Content: width: 1920px, height: 1004px
- Main Content: width: 1920px, height: 673px
- 主内容区:宽度1920px,高度1004px
- 主内容区:宽度1920px,高度673px
Components
组件
- MUST use height for input fields
0px
- 输入框高度必须设为
0px
Buttons
按钮
| Variant | Background | Text | Border | Height | Radius |
|---|---|---|---|---|---|
| Ghost | transparent | #9F9F9C | none | - | - |
| 变体 | 背景色 | 文本色 | 边框 | 高度 | 圆角 |
|---|---|---|---|---|---|
| Ghost | transparent | #9F9F9C | none | - | - |
Inputs
输入框
- Height:
0px
- 高度:
0px
Interactive States
交互状态
Focus
聚焦
- MUST use outline with accent color (
2px)#5E6AD2 - MUST use outline-offset
2px - NEVER remove focus indicators
- 必须使用2px宽的强调色()外轮廓
#5E6AD2 - 必须设置2px的外轮廓偏移量
- 绝不能移除聚焦指示器
Hover
悬停
- Buttons (primary): lighten background by 10%
- Buttons (secondary): use background
#DBD1C0 - List items: use background
#DBD1C0
- 主按钮:背景色提亮10%
- 次级按钮:使用作为背景色
#DBD1C0 - 列表项:使用作为背景色
#DBD1C0
Disabled
禁用
- MUST use
opacity: 0.5 - MUST use
cursor: not-allowed
- 必须设置
opacity: 0.5 - 必须设置
cursor: not-allowed
Interaction
交互
- MUST use an for destructive or irreversible actions
AlertDialog - SHOULD use structural skeletons for loading states
- MUST show errors next to where the action happens
- NEVER block paste in or
inputelementstextarea - MUST add an to icon-only buttons
aria-label
- 对于破坏性或不可逆操作,必须使用
AlertDialog - 加载状态应使用结构化骨架屏
- 错误提示必须显示在操作发生的位置附近
- 绝不能禁用或
input元素的粘贴功能textarea - 纯图标按钮必须添加
aria-label
Animation
动画
- NEVER add animation unless it is explicitly requested
- MUST animate only compositor props (,
transform)opacity - NEVER animate layout properties (,
width,height,top,left,margin)padding - SHOULD use on entrance animations
ease-out - NEVER exceed for interaction feedback
200ms - SHOULD respect
prefers-reduced-motion
- 除非明确要求,否则绝不能添加动画
- 仅能对合成器属性(、
transform)添加动画opacity - 绝不能对布局属性(、
width、height、top、left、margin)添加动画padding - 入场动画应使用缓动函数
ease-out - 交互反馈动画时长绝不能超过200ms
- 应遵循用户偏好设置
prefers-reduced-motion
Performance
性能
- NEVER animate large or
blur()surfacesbackdrop-filter - NEVER apply outside an active animation
will-change - NEVER use for anything that can be expressed as render logic
useEffect
- 绝不能对大面积区域应用或
blur()动画backdrop-filter - 仅能在动画活跃期间使用
will-change - 任何可通过渲染逻辑实现的功能,绝不能使用
useEffect