Organizing rules
Rules live in named groups. Groups keep related guidance together and give your ruleset a clear structure that both you and AI tools can follow.
Rule groups
A group is a named set of rules. You name a group for the topic it covers, then add rules to it. Groups appear throughout UI Rules wherever rules are authored.
- Styles. Each category (color, typography, radius, shadow, spacing, sizing) shows authored General rules groups alongside the brand token values, plus per-token rules where the category supports them.
- Library. Components, blocks, content (voice and tone), accessibility, and brand assets each carry their own rule groups.
- Per-token and per-component. Some places scope rules tightly, such as a rule on a single color token or a single component variant.
Structure your ruleset
Good grouping makes your ruleset easier to maintain and easier for AI tools to apply.
Group by topic
Put rules that govern the same thing in the same group. Keep color rules with color, button rules with the button component, and so on.
Name groups for what they cover
Use a clear, specific name so anyone scanning the brand knows what a group holds before opening it.
Keep groups focused
If a group grows broad, split it into two narrower groups. Smaller, focused groups are easier to weigh and update.
Authored General rules groups in the Styles categories apply across that category. Use them for guidance that spans the whole category rather than a single token.
For how to phrase the rules inside a group, see Writing rules. If you delete a rule, it goes to Trash and can be restored. See Trash.
