n8n 设计 系统
- 作者仓库星标 190,957
- 作者仓库 n8n
Design System
Comprehensive guide for building, styling, and using components in the frontend.
When to Apply
Reference these guidelines when:
- Working on
.{vue|css|scss}files inpackages/frontend - Adding new components to
packages/frontend/@n8n/design-system - Refactoring styles for Vue components
- Implementing new UI components or features
- Reviewing changes to UI
Rules
- Follow guidelines in
packages/frontend/@n8n/design-system/src/styleguide/*.mdx - ALWAYS use CSS variables for styles from
packages/frontend/@n8n/design-system/src/css/_tokens.scssorpackages/frontend/@n8n/design-system/src/css/_primtivies.scss. Use hard-coded values only when no suitable tokens. - ALWAYS prefer using existing components from
packages/frontend/@n8n/design-system/src/components. Prefer components that aren't marked@deprecated. - Use
light-dark()when alternating colors for ligh/dark mode - When working with animations or transitions, ALWAYS prefer using mixins from
packages/frontend/@n8n/design-system/src/css/mixins/motion.scss - When reviewing animations, follow the guides in
rules/web-animation-guidelines.md - When reviewing UI changes or adding new components, follow
rules/web-interface-guidelines.md
Examples
- "Add a modal dialog for confirming workflow deletion" → Use
N8nDialog - "Add a dropdown to select workflow status" → Use
N8nDropdownorN8nSelect - "Add button with + icon to add new tiem" → Wrap
N8nButtonwithiconOnlyprop withN8nTooltipand wrap inN8nTooltip. UseN8nIconand proper aria-label. - "Add a destructive action button" → use
N8nButtonwithvariant="destructive" - "Make background color white/black" → Use
var(--background--surface)for white on light mode and "black" on dark mode - "Animate the title in gracefully" -> Use
fade-in-upmixin frommotion.scsswithvar(--duration--base)
- 流狐分类
- 设计与多媒体
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @n8n-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 即装即用
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Reference these guidelines when: Working on .{vue|css|scss} files in packages/frontend Adding new components to packages/frontend/@n8n/design-system
Follow guidelines in packages/frontend/@n8n/design-system/src/styleguide/.mdx ALWAYS use CSS variables for styles from packages/frontend/@n8n/design-system/src/css/tokens.scss or packages/frontend/@n8n/design-system/src/css/primtivies.scss. Use hard-coded…
"Add a modal dialog for confirming workflow deletion" → Use N8nDialog "Add a dropdown to select workflow status" → Use N8nDropdown or N8nSelect "Add button with + icon to add new tiem" → Wrap N8nButton with iconOnly prop with N8nTooltip and wrap in N8nTooltip.…
# Design System
Comprehensive guide for building, styling, and using components in the frontend.
## When to Apply
Reference these guidelines when:
- Working on `.{vue|css|scss}` files in `packages/frontend`
- Adding new components to `packages/frontend/@n8n/design-system`
- Refactoring styles for Vue components
- Implementing new UI components or features
- Reviewing changes to UI
## Rules
- Follow guidelines in `packages/frontend/@n8n/design-system/src/styleguide/*.mdx`
- ALWAYS use CSS variables for styles from `packages/frontend/@n8n/design-system/src/css/_tokens.scss` or `packages/frontend/@n8n/design-system/src/css/_primtivies.scss`. Use hard-coded values only when no suitable tokens.
- ALWAYS prefer using existing components from `packages/frontend/@n8n/design-system/src/components`. Prefer components that aren't marked `@deprecated`.
- Use `light-dark()` when alternating colors for ligh/dark mode
- When working with animations or transitions, ALWAYS prefer using mixins from `packages/frontend/@n8n/design-system/src/css/mixins/motion.scss`
- When reviewing animations, follow the guides in `rules/web-animation-guidelines.md`
- When reviewing UI changes or adding new components, follow `rules/web-interface-guidelines.md`
## Examples
- "Add a modal dialog for confirming workflow deletion" → Use `N8nDialog`
- "Add a dropdown to select workflow status" → Use `N8nDropdown` or `N8nSelect`
- "Add button with + icon to add new tiem" → Wrap `N8nButton` with `iconOnly` prop with `N8nTooltip` and wrap in `N8nTooltip`. Use `N8nIcon` and proper aria-label.
- "Add a destructive action button" → use `N8nButton` with `variant="destructive"`
- "Make background color white/black" → Use `var(--background--surface)` for white on light mode and "black" on dark mode
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> When to Apply → Rules → Examples
要点 -> Comprehensive guide for building, styling, and using components in the frontend.
文件/命令 -> .{vue|css|scss} · packages/frontend · packages/frontend/@n8n/design-system · packages/frontend/@n8n/design-system/src/styleguide/.mdx · packages/frontend/@n8n/design-system/src/css/tokens.scss · packages/frontend/@n8n/design-system/src/css/primtivies.scss · packages/frontend/@n8n/design-system/src/components · @deprecated
内容 SHA-256 -> 174cd05052d9
原文结构
适用与边界
原文中的明确线索
.{vue|css|scss}、packages/frontend、packages/frontend/@n8n/design-system、packages/frontend/@n8n/design-system/src/styleguide/.mdx、packages/frontend/@n8n/design-system/src/css/tokens.scss、packages/frontend/@n8n/design-system/src/css/primtivies.scss、packages/frontend/@n8n/design-system/src/components、@deprecated