Naming components, variants and props so your design system scales
Naming is the part of design system work that feels trivial until a library hits a few hundred components. Good names make things findable in Figma and predictable in code.
Habits that tend to hold up:
- Name by purpose, not appearance.
Button / primaryages better thanButton / blue. - Match design and code. If the Figma component is
Alertwith aseverityproperty, the code component should not beNotificationwith atypeprop. - Use consistent property names. Pick
sizewithsm / md / lgand use it everywhere, rather than mixingsmall,compactanddense. - Separate variant from state. Variant is a choice the designer makes (
secondary); state is something that happens (hover,disabled,loading). - Avoid abbreviations nobody agreed on.
Btn,TglandChkbxsave little and confuse newcomers. - Keep a short naming doc. One page with rules and examples beats tribal knowledge.
An exercise for your team: take five components and have designers and engineers independently list the names and props they would expect. Where answers differ, you have found your naming debt.
Your turn:
- What naming convention do you follow for Figma variants?
- Have you ever renamed a widely used component, and how did you handle the migration?
Comments · 3
Name by purpose, not appearance. "button/primary" survives a rebrand, while "button/blue" doesn't.
Keep prop names consistent across components. If one uses "size=sm" and another "small", developers will trip over it constantly.
Document naming rules as part of the system. A short guide on "how we name things" saves a lot of review comments.