<aside>
ℹ️
This page contains guidance and rules to follow when creating any new component in the design system or maintaining it. The intention is to avoid errors, apply best practices in the creation of components and design system on Figma, and ensure an alignment across all existing structure and components. This applies to both mobile kit and web kit.
</aside>
1. Design System structure
-
File of design system
- Pages inside the file per component or group of components. -The pages are organized with dividers and titles grouping relative components-
- Frame inside the pages per component or group of components. Don’t create components outside the frame!!!!!
- Component + its variants (at top of the frame) & atom components (at the bottom of the frame)
Visual Example:
<aside>
💡
The reason under this structure is to keep a good system and visibility of folders to help on the visual organization and discoverability of the components of each library when we are outside the DS file.
</aside>
<aside>
💡
There is a page template already created to help you on the starting point of a new component
</aside>



2. Name convention
- File: no rules since it is already created.
- Pages: ICON 💎 + space + Name of Component
Example: 🪗 Accordions
3. Component creation rules
- Use always text styles and colour variables (or styles but preferrable variables = square ones!!) from the Design System foundations
- Create atoms whenever is possible but whenever makes sense.
- E.g. Atoms for title of cards makes sense
- E.g. Atom for a button that is already an existing component, we don’t create a component of that instance of an existing component. We just apply directly the instance and override text.
Otherwise we will be over complexifying and worsening the performance.
- Don’t create components outside the frame!!
- Use autolayout whenever is possible!!
- Apply the backgrounds inside the autolayout whenever is possible. We just need to put the absolute position to the background and ping it to top-right-bottom-left borders to ensure it grows accordingly with the size of the component.
- Balance between the number of variants and its utility: Override is possible and recommended!!!
- Big amount of variants generates a poor maintenance, complexity and performance issues
- Small amount of variants generates too much flexibility and possible future inconsistences due to the difference of usages.
- Always Name the variants and try to put a logic behind the naming. Name the type of variants properly and with consistency with other components of the design system whenever is possible.
- Ensure good organization of the layers in the left sidepanel!!
- Rename properly the layers in the side panel.
E.g.: If I use an instance of an icon.
Instead of keeping the name of the instance which may be something like this: “Icon/General/Save-2-save-toolbar”
We rename the layer with: “Icon” or “Icon left”