Enforcing a Design System with .cursor/rules
Cursor Team · Cursor Docs ·
Write a design-system.mdc rule file that pins spacing scale, color tokens, radius and typography so every component Cursor generates stays on-brand — with examples of scoped rules and glob targeting.
Publisher summary
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.
In this article
- 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
Read original ↗ Content lives on the original publisher's site.
Curated for the Cursor-Design community as a first-party reference on designing with Cursor.