Figma · Lesson 4/5

Design System

What a design system is, why every product needs one, and how I structure fonts, colors and effects with Figma variables.

6 min read9 of 52

Design systems are the unsung heroes behind the products we use every day, whether mobile apps, websites or the interfaces on TV screens and car dashboards. They are the DNA of product design, encoding the principles and elements that shape the experience. Colors and icons convey meaning, buttons are consistently sized and shaped, and language is clear and understandable.

When a design system works well, users don't even notice it. It simply makes the experience seamless.

Without a design system, you risk a crisis of inconsistency, a maze where every turn can lead to confusion, a diluted brand or frustrated users. In this lesson, I cover the fundamentals, show how I build mine in Figma and how to manage libraries. For a deeper introduction, read Figma's Design Systems 101.

Sign in
Input
Checkout
Input
Profile
Input
Try it: one change, every screen
These three screens use the same components and variables. Change a token once and every instance updates, which is exactly why you build a design system early.

Libraries in Figma

A library is a Figma file whose components, styles and variables are published so other files can use them. Change something in the library, publish, and every file that uses it can accept the update.

Convert a file into a library

  1. Create a Figma file that will house your components.
  2. Add components. You need at least one component before you can publish.
  3. Open the Assets tab in the left panel and click the book icon next to it.
  4. In the window that appears, you will see a card with your file's thumbnail and name. Click Publish.

Once published, the file works as a library: you can link it to other files and use its components across your projects.

Example from my Figma file: Convert a file into a library
Example from my Figma file: Convert a file into a library

Link a library to a file

  1. In your file, go to the Assets tab.
  2. Click the book icon to open the list of available libraries. Only published libraries appear.
  3. Search by name or filter by team, then click Add to file.
Example from my Figma file: Link a library to a file
Example from my Figma file: Link a library to a file

Replace a library

Swapping one library for another can be tricky if components, names and nesting are not identical.

  1. In the Assets tab, click the card of the library you want to replace.
  2. Click Swap library at the bottom right.
  3. You will see two columns: the current library's components on the left and the new library's matches on the right. Pick the new one from Choose library.
  4. Make sure names and nesting match (for example "Colors/Primary/100"). If they don't, only some elements will be swapped.
Example from my Figma file: Replace a library
Example from my Figma file: Replace a library

Unlink a library

Open the libraries view, find the library and click the button that says Added so it changes to Remove. Components already in use remain available, but you won't be able to add new ones. Replace them with components from your current library to keep the file organized.

Example from my Figma file: Unlink a library

Fonts

By combining styles with variables, you can make changes quickly and easily. I define font attributes such as sizes (for mobile and desktop), weight, line height and family as variables, and then build text styles from them instead of fixed values.

I use 8 font sizes, which keeps the structure clean and consistent. Styles are grouped into primary and secondary families, and each family has sizes named AAA, BBB, CCC and so on, with three weights available for each size.

You create variables from the right panel, under Local variables, with nothing selected. To apply a variable instead of a fixed value, click the icon next to the field and pick the variable.

Example from my Figma file: Fonts
Example from my Figma file: Fonts
Example from my Figma file: Fonts
Example from my Figma file: Fonts

Colors

I used to manage colors with local styles. With variables, the names stay the same, but the colors now live in a collection of color variables. This lets me link related colors: change one variable and every linked color updates automatically. You can also restrict certain colors to specific uses, such as borders or fills.

Example from my Figma file: Colors
Example from my Figma file: Colors

How I create shades

dark
100%
80%
60%
40%
20%
10%
Try it: build a color scale
The method from this lesson: the color over white at 100, 80, 60, 40, 20 and 10% opacity, plus one copy over black at 80% for a darker shade. Pick any color.
  • Lighter shades: reduce the opacity of the base color over white. The primary color at 80% opacity becomes primary_80.
  • Darker shades: add a black overlay at 20% over the base color. The result is primary_120.

The naming convention is simple: start with the role (primary, secondary or tertiary) and add the tone code. The base primary is primary_100. Lighten it by 20% and it becomes primary_80.

Effects

The design system also includes effects that keep the project uniform: card shadows, corner radius and the space between blocks.

Shadows

Kept as local styles. They could be variables, but for now there is no real benefit.

Radius variables

Predefined for mobile and desktop. They adjust automatically when the two need different values.

Padding variables

Variables for the space between sections avoid errors in auto layout paddings.

Example from my Figma file: Padding variables
Padding variables
Example from my Figma file: Padding variables
Padding variables
Example from my Figma file: Padding variables
Padding variables
Example from my Figma file: Effects
Example from my Figma file: Effects
Example from my Figma file: Effects

Quiz

Check what you learned

  1. What is the main benefit of a design system?
  2. How do I create a lighter version of the primary color?
  3. What must match for a library swap to work fully?
  4. Why define font sizes as variables instead of fixed values?

Exercise

Start your own design system

Create the foundations of a small design system in Figma.

0/5 steps done