SKILL.md
456 tokens · o200k_base · 1,952 bytes
UI Design
Comprehensive guide for building, styling, and using components in the frontend.
References
- When styling components, use
packages/frontend/@n8n/design-system/src/styleguide/*.mdx - For animations, use
rules/web-animation-guidelines.md - When reviewing UI changes, use
rules/web-interface-guidelines.md
Best practices
- ALWAYS use CSS variables for styles from
packages/frontend/@n8n/design-system/src/css/_tokens.scssorpackages/frontend/@n8n/design-system/src/css/_primitives.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. - If you need to add hover/active alpha behavior to solid components, prefer
color-mix()with explicit percentages. - When working with animations or transitions, ALWAYS prefer using mixins from
packages/frontend/@n8n/design-system/src/css/mixins/motion.scss
Components
Use existing design-system components over creating custom implementations:
- "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)
Discovery context
Discovered by repository scan. No exact path reference found in the snapshot’s root AGENTS.md.