ak-ui

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ak-ui

ak-ui

Build original interfaces with ak-ui's industrial geometry, tactical information hierarchy, and terminal-like feedback. Treat ak-ui as a design contract and CSS foundation, not as a request to reproduce a specific Arknights screen.
借助ak-ui的工业几何风格、战术信息层级和类终端反馈效果,打造原创界面。将ak-ui视为设计契约与CSS基础,而非复刻明日方舟特定界面的要求。

Read the relevant references

阅读相关参考文档

  • Always read references/design-language.md and references/tokens.md before making visual decisions.
  • Read references/headless-components.md when adapting native controls or any unstyled/headless library.
  • Also read references/reka-ui.md when the project uses Reka UI or needs a Vue headless primitive.
  • Read references/quality-checklist.md before declaring the work complete.
  • 在做出视觉决策前,务必阅读references/design-language.md和references/tokens.md。
  • 适配原生控件或任何无样式/无头库时,请阅读references/headless-components.md。
  • 当项目使用Reka UI或需要Vue无头基础组件时,还需阅读references/reka-ui.md。
  • 完成工作前,请阅读references/quality-checklist.md。

Inspect before changing

修改前先调研

Determine from the project instead of asking the user when possible:
  1. Framework, package manager, styling system, and existing design tokens.
  2. Existing accessible primitives, headless library, and ak-ui installation.
  3. Components or pages in scope and their interaction states.
  4. Existing brand colors, fonts, spacing, and content hierarchy worth preserving.
Ask only when a missing product choice would materially change the result. Do not replace an existing headless library merely to use a documented example.
尽可能从项目中自行确定以下信息,而非询问用户:
  1. 框架、包管理器、样式系统及现有设计令牌。
  2. 现有可访问性基础组件、无头库及ak-ui的安装情况。
  3. 范围内的组件或页面及其交互状态。
  4. 值得保留的现有品牌颜色、字体、间距及内容层级。
仅当缺失的产品选择会实质性改变结果时才询问用户。不要仅仅为了使用文档示例而替换现有无头库。

Select the style intensity

选择风格强度

Honor an explicitly requested mode:
  • accent
    : Preserve the current brand and layout; add ak-ui typography, signals, focus, and restrained geometry.
  • system
    : Apply the complete design language to surfaces, hierarchy, density, geometry, and states. Use this by default.
  • terminal
    : Add immersive composition, asymmetric command planes, telemetry, depth, and stronger motion. Use only when requested or clearly implied because it can change page composition.
Record the chosen mode in the implementation summary. Do not interpret a mode as a color theme.
遵循明确要求的模式:
  • accent
    :保留当前品牌与布局;添加ak-ui的排版、信号、焦点样式及克制的几何设计。
  • system
    :将完整设计语言应用于界面表层、信息层级、密度、几何形状及状态。默认使用此模式。
  • terminal
    :添加沉浸式布局、不对称命令面板、遥测元素、深度效果及更强的动效。仅在用户明确要求或场景明显需要时使用,因为它会改变页面布局。
在实现总结中记录所选模式。不要将模式误解为颜色主题。

Choose the smallest integration path

选择最小化集成路径

Use this order:
  1. Reuse existing ak-ui CSS classes and components when they fit.
  2. For a custom or headless-only surface, import
    @yunyoujun/ak-ui/tokens.css
    and style the existing behavior with semantic tokens.
  3. For a Vue component already available in the ak-ui Registry, prefer the editable Registry adapter.
  4. For missing behavior, prefer the project's existing headless primitives, then native browser semantics.
  5. Add Reka UI only for Vue interactions that need its accessibility and state machinery. Do not add it for presentation-only elements.
Use the project's package manager. Keep all styling opt-in through
.ak-*
, project-owned component classes, or
data-ak-ui
; do not add global resets or overwrite unrelated elements.
按以下顺序操作:
  1. 若现有ak-ui CSS类和组件适用,则优先复用。
  2. 对于自定义或仅无头的界面,导入
    @yunyoujun/ak-ui/tokens.css
    ,并使用语义令牌为现有行为设置样式。
  3. 若ak-ui Registry中已有可用的Vue组件,优先使用可编辑的Registry适配器。
  4. 对于缺失的行为,优先使用项目现有的无头基础组件,其次是原生浏览器语义。
  5. 仅当Vue交互需要Reka UI的可访问性和状态管理机制时才添加它。不要为仅展示元素添加Reka UI。
使用项目的包管理器。通过
.ak-*
、项目自有组件类或
data-ak-ui
实现所有样式的可选启用;不要添加全局重置样式或覆盖无关元素。

Implement the design contract

执行设计契约

  • Preserve the user's brand by mapping existing brand values to semantic
    --ak-*
    tokens before inventing a new palette.
  • Use public ak-ui tokens for repeated decisions. Do not scatter hard-coded colors, spacing, timing, or cut sizes.
  • Keep behavior, focus management, keyboard navigation, ARIA, and state in native/headless primitives. Map their rendered parts and state attributes to ak-ui styling.
  • Prefer one strong geometric gesture and a clear information hierarchy over decorating every edge.
  • Keep status colors functional and distinguishable. Never make color the only state indicator.
  • Use original or user-provided imagery. Do not obtain, copy, or imitate game assets, logos, character art, or a specific screen composition.
  • Preserve existing public APIs unless the user explicitly requests a breaking redesign.
  • 通过将现有品牌值映射到语义化
    --ak-*
    令牌来保留用户品牌,而非创建新的调色板。
  • 重复决策时使用公开的ak-ui令牌。不要分散使用硬编码的颜色、间距、时长或切割尺寸。
  • 在原生/无头基础组件中保留行为、焦点管理、键盘导航、ARIA属性及状态。将它们的渲染部分和状态属性映射到ak-ui样式。
  • 优先采用一种清晰的几何设计手法和明确的信息层级,而非给每个边缘添加装饰。
  • 保持状态颜色的功能性与可区分性。绝不要将颜色作为唯一的状态指示器。
  • 使用原创或用户提供的图像。不要获取、复制或模仿游戏资源、标志、角色美术或特定界面布局。
  • 保留现有的公开API,除非用户明确要求进行破坏性重设计。

Apply the requested workflow

应用请求的工作流程

Integrate

集成

Install the CSS package or Registry adapter, add the narrowest import, render one representative component, and verify the import in the real build.
安装CSS包或Registry适配器,添加最精简的导入,渲染一个代表性组件,并在实际构建中验证导入是否有效。

Build

构建

Establish hierarchy and responsive layout first. Compose existing primitives, add project content, then apply the selected style intensity. Avoid demo-like placeholder telemetry unless it communicates real product information.
首先建立信息层级和响应式布局。组合现有基础组件,添加项目内容,然后应用所选的风格强度。除非用于传达真实产品信息,否则避免使用类似演示的占位符遥测元素。

Extend

扩展

Write the component contract before styling: parts, states, keyboard behavior, focus ownership, and responsive constraints. Reuse or wrap existing primitives; keep presentation separate from their behavior.
设置样式前先编写组件契约:组件部分、状态、键盘行为、焦点归属及响应式约束。复用或包装现有基础组件;将展示层与行为分离。

Review

审查

Report concrete violations of the design contract, including file locations when available. Fix issues only when the user asks for implementation. Prioritize semantics, interaction loss, token drift, unreadable hierarchy, and mobile overflow over cosmetic differences.
报告违反设计契约的具体问题,如有可能请注明文件位置。仅在用户要求实现修复时才处理问题。优先关注语义错误、交互功能缺失、令牌偏离、信息层级不可读及移动端溢出问题,而非 cosmetic差异。

Verify

验证

Run the project's relevant lint, type-check, build, and tests. When browser tooling is available, inspect desktop and mobile layouts plus keyboard focus, open/closed, selected, disabled, invalid, loading, and reduced-motion states that apply.
Do not claim visual completion from compilation alone. If browser inspection is unavailable, state that limitation and provide the remaining checks from the quality checklist.
运行项目相关的代码检查、类型检查、构建及测试。若有浏览器工具可用,检查桌面端和移动端布局,以及适用的键盘焦点、展开/收起、选中、禁用、无效、加载和减少动效状态。
不要仅通过编译完成就宣称视觉效果达标。若无法进行浏览器检查,请说明此限制,并提供质量检查清单中剩余的检查项。