Naming conventions for Designers
We have different ways of naming components depending on their status (implemented, deprecated, etc).
"To call things by incorrect names is to add to the world’s misery." — Albert Camus
Naming convention for components in Figma
All our components are written in PascalCase. We should strive to sync names between Figma & code as much as possible.
| Convention | Definition | Notes |
|---|---|---|
<Name> | A global Murray component | It has a code equivalent.
Eg. <Button> |
🚧 <Name> | A global component that hasn't been implemented yet. | Eg. 🚧 <Navigation> |
| (Name)` | A pattern or template to help with consistency. | You should detach it otherwise you won't be able to add your content. In code, they're often implemented components.
Eg. (BottomSheet) or (SideModal) |
[Name] | A shortcut for designers to help with consistency. | They're not meant to be implemented.
Eg. [SelectOptionsList] |
Name | A local component | It's not part of Murray for now. It's built ad-hoc by engineers. |
<Name> ❖ Local variant name | A local component that extends a global component in a specific context. | It's not part of Murray for now. It's built ad-hoc by engineers. |
.🚫 <Name> - DATE/OF/DEPRECATION | A deprecated component | The dot unpublishes the component from the library.
Eg. .🚫 <ActionList> - 2022/02/01 |
Naming convention for variants & properties
We should strive to sync variant & properties as much as possible with what is happening in code (with attributes & their arguments).
The difference between "variant" & "color"
Variant signifies there's a semantic reflexion behind it. Eg. with our buttons, we have primary, secondary & danger variants.If we're offering all the color options, these are not variants but colors.
Naming convention for layers in Figma
🚧