ghost-ui-skills

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Ghost UI Skills

Ghost UI 设计指南

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

When to Apply

适用场景

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

Colors

颜色规范

  • MUST use dark backgrounds (lightness < 20) for primary surfaces - detected lightness: 8
  • MUST use
    #FFFFFF
    as page background (
    surface-base
    )
  • SHOULD reduce color palette (currently 18 colors detected)
  • MUST maintain text contrast ratio of at least 4.5:1 for accessibility
  • 必须为主要界面使用深色背景(亮度 < 20)——当前检测亮度:8
  • 必须使用
    #FFFFFF
    作为页面背景(
    surface-base
  • 建议精简调色板(当前检测到18种颜色)
  • 必须保证文本对比度至少为4.5:1,以满足无障碍要求

Semantic Tokens

语义化令牌

TokenHEXRGBUsage
surface-base
#FFFFFFrgb(255,255,255)Page background
surface-raised
#DAE1ECrgb(218,225,236)Cards, modals, raised surfaces
surface-overlay
#0D0E10rgb(13,14,16)Overlays, tooltips, dropdowns
text-primary
#D8D9DCrgb(216,217,220)Headings, body text
text-secondary
#333437rgb(51,52,55)Secondary, muted text
text-tertiary
#4C4E53rgb(76,78,83)Additional text
border-default
#DBE0E8rgb(219,224,232)Subtle borders, dividers
warning
#FAB429rgb(250,180,41)Warning states, cautions
令牌十六进制值RGB值用途
surface-base
#FFFFFFrgb(255,255,255)页面背景
surface-raised
#DAE1ECrgb(218,225,236)卡片、模态框、凸起界面
surface-overlay
#0D0E10rgb(13,14,16)遮罩层、提示框、下拉菜单
text-primary
#D8D9DCrgb(216,217,220)标题、正文文本
text-secondary
#333437rgb(51,52,55)次要、弱化文本
text-tertiary
#4C4E53rgb(76,78,83)辅助文本
border-default
#DBE0E8rgb(219,224,232)细微边框、分隔线
warning
#FAB429rgb(250,180,41)警告状态、提示信息

Typography

排版规范

  • MUST use
    Inter
    as primary font family
  • SHOULD use single font family for consistency
  • MUST use
    73px
    /
    700
    for primary headings
  • MUST use
    26px
    /
    500
    for body text
  • SHOULD reduce font weights (currently 5 detected)
  • 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
    作为主要字体族
  • 建议使用单一字体族以保持一致性
  • 必须为一级标题使用
    73px
    /
    700
    字号/字重
  • 必须为正文文本使用
    26px
    /
    500
    字号/字重
  • 建议精简字体重量(当前检测到5种)
  • 必须为标题使用
    text-balance
    ,为正文使用
    text-pretty
  • 建议为数字数据使用
    tabular-nums
  • 除非明确要求,禁止修改字母间距

Text Styles

文本样式

StyleFontSizeWeightColorCount
heading-1
Inter73px700#1E28261
body
Inter26px500#2F2F2F1
body-secondary
Inter24pxsemi_bold#D8D9DC2
body-secondary
Inter23pxsemi_bold#E5E6E91
text-18px
Inter18pxsemi_bold#C2C3C41
text-14px
Inter14px400#7B7B7B1
text-14px
Inter14px400#7C7C7C1
text-14px
Inter14px400#7878781
text-13px
Inter13px400#3132341
text-13px
Inter13px400#3334381
样式字体字号字重颜色数量
heading-1
Inter73px700#1E28261
body
Inter26px500#2F2F2F1
body-secondary
Inter24pxsemi_bold#D8D9DC2
body-secondary
Inter23pxsemi_bold#E5E6E91
text-18px
Inter18pxsemi_bold#C2C3C41
text-14px
Inter14px400#7B7B7B1
text-14px
Inter14px400#7C7C7C1
text-14px
Inter14px400#7878781
text-13px
Inter13px400#3132341
text-13px
Inter13px400#3334381

Typography Reference

排版参考

Font Families:
  • Inter
    (used 42x)
Font Sizes: 9px, 10px, 11px, 12px, 13px, 14px, 18px, 23px, 24px, 26px, 73px
字体族:
  • Inter
    (使用42次)
字号: 9px, 10px, 11px, 12px, 13px, 14px, 18px, 23px, 24px, 26px, 73px

Spacing

间距规范

  • MUST use 4px grid for spacing
  • SHOULD use spacing from scale: 1px, 2px, 3px, 4px, 5px, 6px, 7px, 8px
  • SHOULD use 65px as default gap between elements
  • NEVER use arbitrary spacing values (use design scale)
  • SHOULD maintain consistent padding within containers
  • 必须使用4px网格系统进行间距设置
  • 建议使用以下间距尺度:1px, 2px, 3px, 4px, 5px, 6px, 7px, 8px
  • 建议使用65px作为元素间的默认间距
  • 禁止使用任意间距值(需遵循设计尺度)
  • 建议保持容器内填充的一致性

Borders

边框规范

  • MUST use border-radius from scale: 3px, 4px, 7px, 13px, 16px
  • SHOULD limit border widths to: 1px, 6px
  • SHOULD use 13px as default border-radius
  • NEVER use arbitrary border-radius values (use design scale)
  • SHOULD use subtle borders (1px) for element separation
  • 必须使用以下圆角尺度:3px, 4px, 7px, 13px, 16px
  • 建议将边框宽度限制为:1px, 6px
  • 建议使用13px作为默认圆角
  • 禁止使用任意圆角值(需遵循设计尺度)
  • 建议使用细微边框(1px)进行元素分隔

Border Radius Reference

圆角参考

Scale: 3px, 4px, 7px, 13px, 16px
尺度: 3px, 4px, 7px, 13px, 16px

Layout

布局规范

  • MUST design for 1920px base viewport width
  • SHOULD use consistent element widths: 260px, 10px, 8px, 13px, 35px
  • 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视口宽度进行设计
  • 建议使用统一的元素宽度:260px, 10px, 8px, 13px, 35px
  • 建议保持文本主导的布局,并具备清晰的层级结构
  • 禁止使用
    h-screen
    ,需使用
    h-dvh
    实现全屏高度
  • 必须为固定元素预留
    safe-area-inset
    安全区域
  • 建议使用
    size-*
    定义方形元素,而非同时使用
    w-*
    +
    h-*

Detected Layout Patterns

检测到的布局模式

  • Main Content: width: 1635px, height: 1080px
  • 主内容区:宽度:1635px,高度:1080px

Components

组件规范

Buttons

按钮组件

VariantBackgroundTextBorderHeightRadius
Ghosttransparent#757678none--
变体背景文本边框高度圆角
Ghost透明#757678--

Interactive States

交互状态

Focus

聚焦状态

  • MUST use
    2px
    outline with accent color (
    #5E6AD2
    )
  • MUST use
    2px
    outline-offset
  • NEVER remove focus indicators
  • 必须使用
    2px
    宽的强调色(
    #5E6AD2
    )外边框
  • 必须设置
    2px
    的外边框偏移量
  • 禁止移除聚焦指示器

Hover

悬停状态

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

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
    处理可通过渲染逻辑实现的内容