codeium-ui-skills

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Codeium UI Skills

Codeium UI 设计指南

Opinionated constraints for building Codeium-style interfaces with AI agents.
用于构建Codeium风格界面的约束性规范,适用于AI Agent相关界面。

When to Apply

适用场景

Reference these guidelines when:
  • Building dark-mode interfaces
  • Creating Codeium-inspired design systems
  • Implementing UIs with Inter font and 4px grid
参考以下指南的场景:
  • 构建深色模式界面时
  • 创建受Codeium启发的设计系统时
  • 实现采用Inter字体和4px网格的UI时

Colors

颜色

  • MUST use dark backgrounds (lightness < 20) for primary surfaces - detected lightness: 17
  • MUST use
    #152443
    as page background (
    surface-base
    )
  • MUST use
    #32E5AD
    for primary actions and focus states (
    accent
    )
  • SHOULD limit color palette to 7 distinct colors
  • MUST maintain text contrast ratio of at least 4.5:1 for accessibility
  • 主界面必须使用深色背景(亮度 < 20)——检测到的亮度为17
  • 页面背景必须使用
    #152443
    surface-base
  • 主要操作和焦点状态必须使用
    #32E5AD
    accent
  • 应将调色板限制为7种不同颜色
  • 为保障可访问性,文本对比度必须至少达到4.5:1

Semantic Tokens

语义化令牌

TokenHEXRGBUsage
surface-base
#152443rgb(21,36,67)Page background
surface-raised
#32E5ADrgb(50,229,173)Cards, modals, raised surfaces
text-primary
#ACB9C8rgb(172,185,200)Headings, body text
text-secondary
#136045rgb(19,96,69)Secondary, muted text
text-tertiary
#CED5DBrgb(206,213,219)Additional text
border-default
#253453rgb(37,52,83)Subtle borders, dividers
accent
#32E5ADrgb(50,229,173)Primary actions, links, focus
令牌十六进制值RGB值用途
surface-base
#152443rgb(21,36,67)页面背景
surface-raised
#32E5ADrgb(50,229,173)卡片、模态框、悬浮层
text-primary
#ACB9C8rgb(172,185,200)标题、正文文本
text-secondary
#136045rgb(19,96,69)次要、弱化文本
text-tertiary
#CED5DBrgb(206,213,219)辅助文本
border-default
#253453rgb(37,52,83)细微边框、分隔线
accent
#32E5ADrgb(50,229,173)主要操作、链接、焦点状态

Typography

排版

  • MUST use
    Inter
    as primary font family
  • SHOULD use single font family for consistency
  • MUST use
    77px
    /
    700
    for primary headings
  • MUST use
    20px
    /
    400
    for body text
  • MUST limit font weights to: regular, bold
  • MUST use
    text-balance
    for headings and
    text-pretty
    for body text
  • SHOULD use
    tabular-nums
    for numeric data
  • NEVER modify letter-spacing unless explicitly requested
  • 必须使用
    Inter
    作为主要字体族
  • 为保持一致性,应使用单一字体族
  • 主标题必须使用
    77px
    /
    700
    (字号/字重)
  • 正文文本必须使用
    20px
    /
    400
    (字号/字重)
  • 必须将字重限制为:常规、粗体
  • 标题必须使用
    text-balance
    ,正文必须使用
    text-pretty
  • 数字数据应使用
    tabular-nums
  • 除非明确要求,否则不得修改字间距

Text Styles

文本样式

StyleFontSizeWeightColorCount
heading-1
Inter77px700#CED5DB1
body
Inter20px400#ACB9C81
body-secondary
Inter20px400#B4BEC91
text-17px
Inter17px400#B2BDCB1
text-14px
Inter14px400#1360451
text-13px
Inter13px400#A0ACBE1
caption
Inter10px400#146F501
label
Inter10px400#A7B3C21
label
Inter10px400#A1ADBD1
label
Inter10px400#A9B6C41
样式字体字号字重颜色使用次数
heading-1
Inter77px700#CED5DB1
body
Inter20px400#ACB9C81
body-secondary
Inter20px400#B4BEC91
text-17px
Inter17px400#B2BDCB1
text-14px
Inter14px400#1360451
text-13px
Inter13px400#A0ACBE1
caption
Inter10px400#146F501
label
Inter10px400#A7B3C21
label
Inter10px400#A1ADBD1
label
Inter10px400#A9B6C41

Typography Reference

排版参考

Font Families:
  • Inter
    (used 13x)
Font Sizes: 10px, 13px, 14px, 17px, 20px, 77px
字体族:
  • Inter
    (使用13次)
字号: 10px, 13px, 14px, 17px, 20px, 77px

Spacing

间距

  • MUST use 4px grid for spacing
  • SHOULD use spacing from scale: 5px, 6px, 16px, 29px, 42px
  • SHOULD use 6px as default gap between elements
  • NEVER use arbitrary spacing values (use design scale)
  • SHOULD maintain consistent padding within containers
  • 必须使用4px网格作为间距基准
  • 应使用以下间距刻度值:5px, 6px, 16px, 29px, 42px
  • 元素之间的默认间距应使用6px
  • 不得使用任意间距值(必须使用设计刻度)
  • 容器内的内边距应保持一致

Borders

边框

  • MUST use 1px border width consistently
  • NEVER use arbitrary border-radius values (use design scale)
  • SHOULD use subtle borders (1px) for element separation
  • 必须统一使用1px边框宽度
  • 不得使用任意边框圆角值(必须使用设计刻度)
  • 应使用细微边框(1px)分隔元素

Layout

布局

  • MUST design for 1920px base viewport width
  • SHOULD use consistent element widths: 6px, 157px, 74px
  • SHOULD maintain text-heavy layout with clear hierarchy
  • NEVER use
    h-screen
    , use
    h-dvh
    for full viewport height
  • MUST respect
    safe-area-inset
    for fixed elements
  • SHOULD use
    size-*
    for square elements instead of
    w-*
    +
    h-*
  • 必须以1920px为基础视口宽度进行设计
  • 应使用统一的元素宽度:6px, 157px, 74px
  • 应保持以文本为主的布局,层次结构清晰
  • 不得使用
    h-screen
    ,应使用
    h-dvh
    实现全屏高度
  • 固定元素必须考虑
    safe-area-inset
    (安全区域内边距)
  • 方形元素应使用
    size-*
    ,而非
    w-*
    +
    h-*

Detected Layout Patterns

检测到的布局模式

  • Main Content: width: 1920px, height: 1080px
  • Main Content: width: 1920px, height: 802px
  • Header: height: 84px
  • 主内容区:宽度1920px,高度1080px
  • 主内容区:宽度1920px,高度802px
  • 页头:高度84px

Components

组件

Buttons

按钮

VariantBackgroundTextBorderHeightRadius
Ghosttransparent#B2BDCBnone--
变体背景文本边框高度圆角
Ghosttransparent#B2BDCBnone--

Interactive States

交互状态

Focus

焦点状态

  • MUST use
    2px
    outline with accent color (
    #32E5AD
    )
  • MUST use
    2px
    outline-offset
  • NEVER remove focus indicators
  • 必须使用2px宽的
    #32E5AD
    (强调色)外轮廓
  • 必须使用2px的外轮廓偏移量
  • 不得移除焦点指示器

Hover

悬停状态

  • Buttons (primary): lighten background by 10%
  • Buttons (secondary): use
    #32E5AD
    background
  • List items: use
    #32E5AD
    background
  • 主按钮:背景亮度提高10%
  • 次要按钮:使用
    #32E5AD
    作为背景
  • 列表项:使用
    #32E5AD
    作为背景

Disabled

禁用状态

  • MUST use
    opacity: 0.5
  • MUST use
    cursor: not-allowed
  • 必须设置
    opacity: 0.5
  • 必须设置
    cursor: not-allowed

Interaction

交互逻辑

  • MUST use an
    AlertDialog
    for destructive or irreversible actions
  • SHOULD use structural skeletons for loading states
  • MUST show errors next to where the action happens
  • NEVER block paste in
    input
    or
    textarea
    elements
  • MUST add an
    aria-label
    to icon-only buttons
  • 破坏性或不可逆操作必须使用
    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
    ease-out
    on entrance animations
  • NEVER exceed
    200ms
    for interaction feedback
  • SHOULD respect
    prefers-reduced-motion
  • 除非明确要求,否则不得添加动画
  • 只能对合成器属性(
    transform
    opacity
    )设置动画
  • 不得对布局属性(
    width
    height
    top
    left
    margin
    padding
    )设置动画
  • 入场动画应使用
    ease-out
    缓动函数
  • 交互反馈动画时长不得超过200ms
  • 应尊重
    prefers-reduced-motion
    (减少动画偏好设置)

Performance

性能

  • NEVER animate large
    blur()
    or
    backdrop-filter
    surfaces
  • NEVER apply
    will-change
    outside an active animation
  • NEVER use
    useEffect
    for anything that can be expressed as render logic
  • 不得对大面积区域设置
    blur()
    backdrop-filter
    动画
  • 不得在非活跃动画中使用
    will-change
    属性
  • 任何可通过渲染逻辑实现的功能,不得使用
    useEffect