Figma · Lesson 5/5
Design Rules
The rules I follow in every Figma project, from file setup to components, icons, colors and exports.
These are the rules I follow in every project. I update them regularly as Figma evolves and as I improve my process. They are opinionated on purpose: what matters is not these exact rules but that you have rules, so your files are predictable for you, your clients and the developers who build them.
General guidelines
Project setup
- Start from a base project. Never start from scratch. Duplicate the files of a base project so all configurations and styles are already there.
- Frame sizes. Frame height can grow as needed, but critical elements, like the call to action on a landing page, must be visible within the base height.
- Mobile: 392 × 840 px.
- Desktop: 1280 × 720 px.
Project organization
- File pages organize the project. Sections represent the different flows of the app, such as registration or checkout. Flow groups use arrows between frames to show interactions, like a button press or a transition.
- Never paste components or styled elements from other design systems that aren't linked to the project's own design system.
Design practices
- Not everything needs to be a component. Only turn repeated elements into components, and check whether a component already exists before creating a new one.
- If a screen repeats in another frame, don't duplicate it. Type the frame's name in the center of the new frame instead.
- Name every layer properly.
- Transfer file ownership to the right person, usually the client, when the project ends.
Status tracking for frames
Figma's built-in status only tells you whether a frame is ready for development. That's not enough for a real workflow, so I use a custom status component on every frame. Sections can also have a status color, but the component is what communicates each frame's exact state.


Layouts and grid system
- Predefined layouts: I keep three layout grids, desktop, tablet and mobile, to visualize the column structure.
- 8px grid: all spacing uses increments of 8 (8, 16, 24, 32 and so on). You will learn more in the Layout & Space lesson.

Components and variables
To keep designs consistent and easy to understand for anyone opening the file, I follow these rules when creating components and variables:
Every state
When creating a component, design all its states. A button needs default, hover, focus, error and disabled, not only the default.
Responsive
Make components responsive so they adapt to different screen sizes and contexts.
Nesting
If a component contains another one (a button with an icon), create the nested component in its own category, for example "Icons", and use it inside.
Consistent properties
Instances of a component share the same properties, so the design stays uniform.
Auto layout, not fixed layers
Never use layers to force sizes or backgrounds. Use auto layout so components stay flexible.
Unique names
Different components and properties never share a name. It avoids confusion and keeps the library organized.
Mobile and desktop together
When a component needs both versions, create them at the same time: duplicate the mobile one and set its device property to "Desktop".

Buttons
Variables control font sizes and padding, so I no longer need separate mobile and desktop buttons. Still, a few rules keep buttons clear:
- I use 5 button types: primary, secondary, negative, primary link and secondary link.
- Every type covers 5 states for developers: default, hover, focus, error and disabled.
- The negative variant is for actions we'd rather users not take, typically destructive ones like deleting data.
- For low-priority actions, like deleting an account, use the designated button instead of a plain text link, so they are clearly distinguished from primary actions.
- Don't use a text-and-icon button when only an icon is needed. Use the icon button component.
- Style every variable so the full set of buttons can be shown in the style guide.

Inputs and selects
- When you style one variant, apply the same styles to all related variants.
- Add every new component and its variables to the style guide.
- Keep two search components: one for general content and one for page headers.
- Build components with all their layers active and use properties to show or hide them. Be careful: hidden layers can cause problems when updating the design system.
- Style the dropdown that appears when a select opens, so every interactive element looks cohesive.

Icons
- Every icon component is 40 × 40 px, with a 40 × 40 px slice on top of its layers.
- Each icon has one single layer named "Vector". If it's named differently or has more layers, it can lose its color when swapped.
- The default icon color in the design system is #000000.
- Icon component names start with "i_".
- Set the icon layer's constraints to Scale, so it keeps its proportions when resized.
- The icon drawing itself is at most 24 × 24 px.
- Add every icon to the style guide so they are documented and easy to export together.

Colors
Colors live in local variables, not local styles:
- Use "/" to create folders, for example "Primary/100".
- Derive shades from pure black (#000000) and pure white (#FFFFFF): 10%, 20%, 40%, 60%, 80% and 120%.
- Name variables by category: Primary, Secondary, Background, Others, Feedback and Social, each with shades like 120, 100, 80, 60, 40, 20, 10 and 00.
- Don't use background variables for components, or component colors for backgrounds. Create specific variables for each.
- Social colors are only for social elements. Create separate variables for anything else.
- Add the variables to the style guide so developers can find them.

Fonts
- Create a type scale with a tool like Typescale or its Figma plugin.
- Variables define 8 sizes, 3 weights (700 bold, 400 regular, 300 light), a line height for each size and two font families (remove the second if you don't use it).
- Text styles follow the structure Primary/AAA/700: family (Primary or Secondary), size (AAA to HHH) and weight (700, 400 or 300).
- Never set sizes or line heights by hand. Always use the variables. Mobile and desktop sizes switch automatically based on the page's variable mode.
- Add the styles to the style guide so developers have every option in one place.



Page management
- Don't rename or reorder pages. Consistency across Figma files is crucial.
- When you add a page, give it a representative icon and a clear name.
- Keep the same background color on every page. If a project needs a different one, change it everywhere.
- Use variable modes on each page to switch between mobile and desktop font sizes and spacing. You can change the mode from the right panel, next to the "Page" label, without selecting anything.


Exporting assets
I follow standards agreed with developers so they always find what they need in the right format:
- Icons: export with the slice as SVG, in a single color (#000000).
- Images: export as PNG at 1x, 2x and 3x, then compress them with ImageOptim (Mac) or its web version.
- Folders: when sharing assets via Google Drive, keep a clear, consistent folder structure.


Importing elements
- Unlink colors, effects and other properties from the original design system when importing elements from other files.
- Use free stock images, like Unsplash, unless the client has given permission to use paid ones.
- Imported elements don't always need to become UI. Sometimes an icon is enough.

Quiz
Check what you learned
Exercise
Apply the rules to your file
Take your exercises file and bring it up to professional standards.
0/5 steps done