nsh-design-guides

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

NSH Design Guides

NSH 设计指南

Resolve the bundled guide relative to this skill’s directory, not the app directory. The guide is references/design-guides.md. It is a requirement, not inspiration. Read the guide file itself before doing UI work. Do not answer from this page, from an existing screen in the codebase, or from training data.
If the file is missing, fetch
https://nsh.dev/docs/design-guides.md
. The guide is a verbatim copy of that page, so a link in it such as
./coding-guides.md
means
https://nsh.dev/docs/coding-guides.md
(also in the
nsh
skill), and
../elements/index.md
means
https://nsh.dev/elements/index.md
.
Apply the guide within the user’s requested scope and the app’s established visual language. For a narrow change, preserve surrounding screens and components. Use semantic NSH base components, style their visible parts, and inspect the actual result in the requested appearance and viewport when available. Behavior tests alone do not verify layout or styling; state when visual verification is unavailable.
For NSH APIs and implementation, use the
nsh
skill when installed, or the relevant page from the documentation index.
请相对于此 skill 的目录解析随附指南的路径,而不是相对于应用目录。
指南位于 references/design-guides.md。它是必须遵循的要求,而不是灵感参考。开始 UI 工作前,请直接阅读该指南文件。不要依据本页、代码库中的现有屏幕或训练数据作答。
如果文件缺失,请获取
https://nsh.dev/docs/design-guides.md
。该指南是此页面的逐字副本,因此其中的链接(例如
./coding-guides.md
)表示
https://nsh.dev/docs/coding-guides.md
(同样位于
nsh
skill 中),而
../elements/index.md
表示
https://nsh.dev/elements/index.md
。
请在用户请求的范围和应用既有的视觉语言内应用指南。对于局部改动,应保留周围的屏幕和组件。使用语义化的 NSH 基础组件,对其可见部分进行样式设置,并在可用时,以指定的外观和视口检查实际呈现结果。仅靠行为测试无法验证布局或样式;如果无法进行视觉验证,应明确说明。
对于 NSH API 和实现,请使用已安装的
nsh
skill(如果已安装),或文档索引中的相关页面。

How to read it

阅读方法

Read the whole guide for a new screen or a redesign. For a narrow change, read "Design thesis" and "Start from the task" first, then the section for the change. Sections, in order (
grep -n '^## ' references/design-guides.md
):
SectionRead when
Design thesisAlways
Learning from ShadcnChoosing what to borrow from web component libraries
Start from the taskAlways; task hierarchy, what to leave out
Visual languageColor, typography, spacing, radius, borders, elevation, density, icons
Layout patternsWindow and page structure, sidebars, toolbars, panels, forms
Components and compositionPicking a component, composing parts, when to build a new one
Interaction statesHover, focus, pressed, selected, disabled, loading, validation, danger
Feedback and overlaysDialog, sheet, popover, menu, notification, tooltip, dismissal, focus
MotionAny animation or transition
Designing data-heavy interfacesTables, lists, trees, dashboards, dense inspectors
Interface languageAny user-facing text: labels, buttons, titles, errors, empty states
Internationalization and platform fitMulti-locale copy, Chinese terminology, platform conventions
Guidance for AI-generated interfacesAlways when an agent produces UI
Accessibility checklistBefore finishing
Design review checklistBefore finishing; run every item against the work
对于新屏幕或重新设计,请通读整份指南。对于局部改动,请先阅读“Design thesis(设计理念)”和“Start from the task(从任务出发)”,然后阅读与改动对应的章节。各章节按以下顺序排列(
grep -n '^## ' references/design-guides.md
):
Section(章节)Read when(何时阅读)
Design thesis(设计理念)始终阅读
Learning from Shadcn(从 Shadcn 学习)选择从 Web 组件库中借鉴的内容时
Start from the task(从任务出发)始终阅读;任务层级、应舍弃的内容
Visual language(视觉语言)颜色、字体排印、间距、圆角、边框、阴影层级、信息密度、图标
Layout patterns(布局模式)窗口和页面结构、侧边栏、工具栏、面板、表单
Components and composition(组件与组合)选择组件、组合部件以及何时构建新组件
Interaction states(交互状态)Hover(悬停)、Focus(聚焦)、Pressed(按下)、Selected(选中)、Disabled(禁用)、Loading(加载)、Validation(校验)、Danger(危险)
Feedback and overlays(反馈与叠加层)Dialog(对话框)、Sheet(侧滑面板)、Popover(弹出层)、Menu(菜单)、Notification(通知)、Tooltip(工具提示)、关闭行为、焦点管理
Motion(动效)任何动画或过渡效果
Designing data-heavy interfaces(设计数据密集型界面)表格、列表、树、仪表板、高密度检查器
Interface language(界面语言)任何面向用户的文本:标签、按钮、标题、错误信息、空状态
Internationalization and platform fit(国际化与平台适配)多语言版本文案、中文术语、平台约定
Guidance for AI-generated interfaces(AI 生成界面指南)Agent 生成 UI 时始终阅读
Accessibility checklist(无障碍检查清单)完成工作前
Design review checklist(设计评审检查清单)完成工作前;逐项对照工作成果进行检查