Guidelines on designing and building UI. Use when working in editor-ui or design-system packages. Triggers for tasks that include refactoring components, stylin
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-ui-design-e8a4ecb171e3 ,按照其中的说明把「n8n:ui-design」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Comprehensive guide for building, styling, and using components in the frontend.
packages/frontend/@n8n/design-system/src/styleguide/*.mdxrules/web-animation-guidelines.mdrules/web-interface-guidelines.md_tokens.scss or _primitives.scss in
packages/frontend/@n8n/design-system/src/css/. Look up every length, color,
font-size and duration before you write it as a literal. Each spacing token
carries its px value in a comment: --spacing--5xs: 0.125rem; /** 2px **/.
Grep that comment to find the token for a px value. The grep gives one hit for
each token family, so pick the family that matches the property: --spacing--*
for margin and padding, --radius--* for border-radius, --height--* for
height. The styleguide
packages/frontend/@n8n/design-system/src/styleguide/spacing-size.mdx lists the
same scale as a table. The spacing scale starts at 2px, so a small value is not
a reason to hardcode. Hardcode only if the lookup finds no token. Give the
reason in a comment.packages/frontend/@n8n/design-system/src/components. Prefer components that aren't marked @deprecated.color-mix() with explicit percentages.packages/frontend/@n8n/design-system/src/css/mixins/motion.scssUse existing design-system components over creating custom implementations:
N8nDialogN8nDropdown or N8nSelectN8nButton with iconOnly prop with N8nTooltip and wrap in N8nTooltip. Use N8nIcon and proper aria-label.N8nButton with variant="destructive"var(--background--surface) for white on light mode and "black" on dark modefade-in-up mixin from motion.scss with var(--duration--base)