anduril
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAnduril Design System
Anduril设计系统
When invoked, apply these opinionated constraints for building better interfaces.
启用后,应用这些约束规范来构建更优质的界面。
How to use
使用方法
- — Apply these constraints to any UI work in this conversation.
/anduril - — Review the file against all constraints and output violations, why it matters, and a concrete fix.
/anduril <file>
- — 将这些约束应用于本次对话中的所有UI工作。
/anduril - — 对照所有约束审查文件,输出违规项、违规原因以及具体修复方案。
/anduril <file>
Design System: Anduril
设计系统:Anduril
Colors
颜色
Core Palette
css
/* Backgrounds */
--bg-black: #000000; /* Pure black - dark mode primary */
--bg-dark: #1a1a1a; /* Near black - dark mode secondary */
--bg-warm: #f5f3ef; /* Warm off-white - light mode primary */
--bg-white: #ffffff; /* Pure white - cards, inputs */
/* Text */
--text-primary: #010101; /* Near black */
--text-inverse: #ffffff; /* White on dark */
--text-muted: #666666; /* Secondary text */
--text-subtle: #999999; /* Tertiary text */
/* Brand Accent */
--accent-lime: #DFF140; /* Anduril signature lime - primary accent */
--accent-lime-hover: #c8d93a;
/* Semantic */
--color-error: #FF3535; /* Red - errors, destructive */
--color-error-bg: #fef2f2;
--color-success: #16a34a; /* Green - success states */
--color-success-bg: #f0fdf4;
--color-info: #2563eb; /* Blue - info, links */
--color-info-bg: #eff6ff;
--color-warning: #f59e0b; /* Amber - warnings */
--color-warning-bg: #fffbeb;
/* Borders */
--border-light: #e5e5e5;
--border-default: #ddd;
--border-dark: #333333;Tailwind Config
js
colors: {
anduril: {
black: '#000000',
dark: '#1a1a1a',
warm: '#f5f3ef',
lime: '#DFF140',
'lime-hover': '#c8d93a',
}
}Usage Guidelines
- Use sparingly — one accent per view
--accent-lime - Dark mode: background,
--bg-blackfor CTAs--accent-lime - Light mode: background,
--bg-warmfor CTAs--text-primary - NEVER use lime on light backgrounds (poor contrast)
- Reserve for destructive actions only
--color-error
核心调色板
css
/* Backgrounds */
--bg-black: #000000; /* Pure black - dark mode primary */
--bg-dark: #1a1a1a; /* Near black - dark mode secondary */
--bg-warm: #f5f3ef; /* Warm off-white - light mode primary */
--bg-white: #ffffff; /* Pure white - cards, inputs */
/* Text */
--text-primary: #010101; /* Near black */
--text-inverse: #ffffff; /* White on dark */
--text-muted: #666666; /* Secondary text */
--text-subtle: #999999; /* Tertiary text */
/* Brand Accent */
--accent-lime: #DFF140; /* Anduril signature lime - primary accent */
--accent-lime-hover: #c8d93a;
/* Semantic */
--color-error: #FF3535; /* Red - errors, destructive */
--color-error-bg: #fef2f2;
--color-success: #16a34a; /* Green - success states */
--color-success-bg: #f0fdf4;
--color-info: #2563eb; /* Blue - info, links */
--color-info-bg: #eff6ff;
--color-warning: #f59e0b; /* Amber - warnings */
--color-warning-bg: #fffbeb;
/* Borders */
--border-light: #e5e5e5;
--border-default: #ddd;
--border-dark: #333333;Tailwind配置
js
colors: {
anduril: {
black: '#000000',
dark: '#1a1a1a',
warm: '#f5f3ef',
lime: '#DFF140',
'lime-hover': '#c8d93a',
}
}使用指南
- 谨慎使用——每个视图仅使用一种强调色
--accent-lime - 深色模式:使用作为背景,
--bg-black用于CTA按钮--accent-lime - 浅色模式:使用作为背景,
--bg-warm用于CTA按钮--text-primary - 绝对不要在浅色背景上使用石灰绿(对比度差)
- 仅将用于破坏性操作
--color-error
Typography
排版
- MUST use
'Helvetica Neue', Helvetica, Arial, sans-serif - Base font size: , weight:
15px, line-height:4001.5 - Headers: (never bold)
font-weight: 400 - Labels: ,
11px,uppercase,letter-spacing: 0.05emcolor: var(--text-muted) - Hero headings: ,
48px,font-weight: 400line-height: 1.1 - Navigation/header text: ,
14px,uppercaseletter-spacing: 0.1em
- 必须使用字体
'Helvetica Neue', Helvetica, Arial, sans-serif - 基础字体大小:,字重:
15px,行高:4001.5 - 标题:(绝不用粗体)
font-weight: 400 - 标签:,大写,
11px,颜色:letter-spacing: 0.05emvar(--text-muted) - 主标题:,字重:
48px,行高:4001.1 - 导航/头部文本:,大写,
14pxletter-spacing: 0.1em
Spacing
间距
- Cards:
padding: 32px - Main content: ,
padding: 48pxmax-width: 1200px - Header:
padding: 24px 48px - Form elements: between fields
margin-top: 16px
- 卡片:
padding: 32px - 主内容区:,最大宽度:
padding: 48px1200px - 头部:
padding: 24px 48px - 表单元素:字段间距
margin-top: 16px
Components
组件
Cards
background: #ffffff- — NO borders
border: none - — sharp corners always
border-radius: 0 - NO shadows
Buttons
background: var(--text-primary)color: var(--text-inverse)border: 1px solid var(--text-primary)padding: 12px 24px- — sharp corners
border-radius: 0 font-weight: 400- Hover:
opacity: 0.85 - Disabled:
opacity: 0.5
Inputs
padding: 10px 12pxborder: 1px solid #dddborder-radius: 0- Focus: , no outline
border-color: var(--text-primary)
Method badges
font-family: monospacefont-size: 11pxtext-transform: uppercaseletter-spacing: 0.05empadding: 4px 8px- POST:
color: #2563eb; background: #eff6ff - GET:
color: #16a34a; background: #f0fdf4
Response/code blocks
background: var(--bg-warm)font-family: monospacefont-size: 12px- Error state:
background: #fef2f2; color: #dc2626 - Success state:
background: #f0fdf4; color: #16a34a
卡片
background: #ffffff- — 绝对不要边框
border: none - — 始终使用直角
border-radius: 0 - 绝对不要阴影
按钮
background: var(--text-primary)color: var(--text-inverse)border: 1px solid var(--text-primary)padding: 12px 24px- — 直角
border-radius: 0 font-weight: 400- 悬停状态:
opacity: 0.85 - 禁用状态:
opacity: 0.5
输入框
padding: 10px 12pxborder: 1px solid #dddborder-radius: 0- 聚焦状态:,无外轮廓
border-color: var(--text-primary)
方法徽章
font-family: monospacefont-size: 11px- 文本转换为大写
letter-spacing: 0.05empadding: 4px 8px- POST:
color: #2563eb; background: #eff6ff - GET:
color: #16a34a; background: #f0fdf4
响应/代码块
background: var(--bg-warm)font-family: monospacefont-size: 12px- 错误状态:
background: #fef2f2; color: #dc2626 - 成功状态:
background: #f0fdf4; color: #16a34a
Stack
技术栈
- MUST use Tailwind CSS defaults unless custom values already exist
- MUST use when JavaScript animation is required
motion/react - SHOULD use for entrance and micro-animations
tw-animate-css - MUST use utility (
cn+clsx) for class logictailwind-merge
- 除非已有自定义值,否则必须使用Tailwind CSS默认值
- 当需要JavaScript动画时,必须使用
motion/react - 进入动画和微动画建议使用
tw-animate-css - 类逻辑必须使用工具(
cn+clsx)tailwind-merge
Components
组件规范
- MUST use accessible component primitives (,
Base UI,React Aria)Radix - MUST use the project's existing primitives first
- NEVER mix primitive systems within the same surface
- MUST add to icon-only buttons
aria-label - NEVER rebuild keyboard or focus behavior by hand
- 必须使用无障碍组件原语(,
Base UI,React Aria)Radix - 优先使用项目现有的组件原语
- 绝对不要在同一界面混合使用不同的组件原语系统
- 纯图标按钮必须添加
aria-label - 绝对不要手动重构键盘或焦点行为
Interaction
交互规范
- MUST use for destructive actions
AlertDialog - SHOULD use structural skeletons for loading states
- NEVER use , use
h-screenh-dvh - MUST respect for fixed elements
safe-area-inset - MUST show errors next to where the action happens
- NEVER block paste in inputs
- 破坏性操作必须使用
AlertDialog - 加载状态建议使用结构化骨架屏
- 绝对不要使用,改用
h-screenh-dvh - 固定元素必须考虑安全区域
safe-area-inset - 错误提示必须显示在操作发生的位置附近
- 绝对不要禁止输入框的粘贴功能
Animation
动画规范
- NEVER add animation unless explicitly requested
- MUST animate only compositor props (,
transform)opacity - NEVER animate layout props (,
width,height,top,left,margin)padding - SHOULD use on entrance
ease-out - NEVER exceed for interaction feedback
200ms - MUST pause looping animations when off-screen
- SHOULD respect
prefers-reduced-motion
- 除非明确要求,否则绝对不要添加动画
- 必须仅对合成器属性(,
transform)执行动画opacity - 绝对不要对布局属性(,
width,height,top,left,margin)执行动画padding - 进入动画建议使用缓动
ease-out - 交互反馈动画时长绝对不要超过
200ms - 循环动画在界面外时必须暂停
- 建议尊重设置
prefers-reduced-motion
Typography
排版补充规范
- MUST use for headings,
text-balancefor bodytext-pretty - MUST use for data
tabular-nums - SHOULD use or
truncatefor dense UIline-clamp - NEVER modify unless explicitly requested
letter-spacing
- 标题必须使用,正文必须使用
text-balancetext-pretty - 数据类文本必须使用
tabular-nums - 密集型UI建议使用或
truncateline-clamp - 除非明确要求,否则绝对不要修改
letter-spacing
Layout
布局规范
- MUST use a fixed scale (no arbitrary
z-index)z-* - SHOULD use for square elements
size-*
- 必须使用固定的层级(禁止使用任意
z-index值)z-* - 方形元素建议使用类
size-*
Performance
性能规范
- NEVER animate large or
blur()surfacesbackdrop-filter - NEVER apply outside an active animation
will-change - NEVER use for render logic
useEffect
- 绝对不要对大面积元素执行或
blur()动画backdrop-filter - 绝对不要在非活跃动画上使用
will-change - 绝对不要使用处理渲染逻辑
useEffect
Design — Anduril Style
Anduril风格设计准则
Shape & Surface
- NEVER use border-radius — sharp corners only
- NEVER use shadows on cards
- NEVER use gradients
- NEVER use glow effects
- NEVER use purple or multicolor anything
Color Usage
- Light mode: (#f5f3ef) background, dark buttons
--bg-warm - Dark mode: (#000000) background, lime accent CTAs
--bg-black - MUST use (#DFF140) for primary actions in dark mode only
--accent-lime - NEVER use lime on light backgrounds — use near-black instead
- SHOULD limit accent color to ONE per view
- Use semantic colors (,
--color-error) consistently--color-success
Typography
- MUST keep headers lightweight ()
font-weight: 400 - MUST use uppercase + letter-spacing for labels and nav
- NEVER use bold for headings
States
- MUST give empty states one clear next action
- Error states: red text (#FF3535), light red background (#fef2f2)
- Success states: green text (#16a34a), light green background (#f0fdf4)
- Disabled: ,
opacity: 0.5cursor: not-allowed
形状与界面
- 绝对不要使用圆角——始终使用直角
- 卡片绝对不要使用阴影
- 绝对不要使用渐变
- 绝对不要使用发光效果
- 绝对不要使用紫色或多色元素
颜色使用
- 浅色模式:(#f5f3ef)作为背景,深色按钮
--bg-warm - 深色模式:(#000000)作为背景,石灰绿作为CTA强调色
--bg-black - 仅在深色模式下将(#DFF140)用于主要操作
--accent-lime - 绝对不要在浅色背景上使用石灰绿——改用近黑色
- 建议每个视图仅使用一种强调色
- 统一使用语义化颜色(,
--color-error)--color-success
排版
- 标题必须保持轻量化()
font-weight: 400 - 标签和导航文本必须使用大写+字间距
- 绝对不要对标题使用粗体
状态规范
- 空状态必须提供一个明确的下一步操作
- 错误状态:红色文本(#FF3535),浅红色背景(#fef2f2)
- 成功状态:绿色文本(#16a34a),浅绿色背景(#f0fdf4)
- 禁用状态:,
opacity: 0.5cursor: not-allowed