使用 .cursor/rules 強制設計系統
Cursor Team · Cursor Docs ·
撰寫 design-system.mdc 規則檔案,固定間距標度、色彩 token、圓角和排版,確保 Cursor 生成的每個元件都符合品牌——包含範圍規則和 glob 定位的範例。
發布者摘要
Write a design-system.mdc rule that pins spacing scale, color tokens, radius and typography so every component Cursor generates stays on-brand. Covers scoped rules and glob targeting.
文章結構
- Anatomy of a design-system rule
- Pinning tokens: color, spacing, radius
- Scoping rules with globs
- Always-on vs auto-attached
- Testing the rule on a new component
Source: Cursor Docs
閱讀原文 ↗ 內容託管在原發布者的網站上。
由 Cursor-Design 社群精選,作為用 Cursor 做設計的第一手參考。