UX Collective

We believe designers are thinkers as much as they are makers. https://linktr.ee/uxc

Follow publication

Cascading Components: a different way to organize Figma variants

Bruno Temporim Carneiro
UX Collective
Published in
11 min readJan 20, 2023

An illustration showing the general ideia of a cascading component in an abstract way in three steps: 1st — three circles of different sizes; 2nd - a circle and a square of the same size; 3rd -  9 circles with different colors, fillings and size.

1. Why do Figma components need organization?

54 variants of a button component. The image is divided in rows and columns: the first column shows the primary (blue); the second column shows the danger (red) and the third one shows the disabled (grey). The first three rows show the contained style button, then the outlined and lastly the text style, all in the small version. Rows 4 to 6 and 7 to 9 show the same but for the medium and large buttons respectively. Rows 10 to 18 repeats the same logic but for the rounded variety.
A simple button component can lead to many variations, highlighting the need for organization.

2. Structuring components to make managing easier

The image is divided in 3 master components: from left to right we have the first instance, a button component with only sizes; the second one with squared and rounded styles, and the 3rd and last one with types (contained, outlined and text) and states (idle, danger and disabled).
The component structured with a cascading logic.

3. Creating the button component using the cascading logic

This image shows the first step of the component creation. Here is displayed the Figma sidebar menu with details about pixel size and auto-layout settings. Detailed information can be found on the box below.
The base component, with assigned properties and auto-layout.
First, create a frame of any size, add an icon (20x20px) to act as our 
leading-icon, and a text (16pt body size/20pt line height) to be our
label. Keep in mind that the icon can be a component of its own, so you
can also add an instance swap feature.

Now, add the auto-layout feature (shift+A) and set these values:
- Space between items: 8px
- Horizontal padding: 24px
- Vertical padding: 10px

Set the following frame size constraints (at the top of the sidebar menu):
- Horizontal resizing: FIXED (to adjust to your own UI gridstyle)
- Vertical resizing: HUG

Inside the frame, select the icon frame, and in the sidebar menu panel
add the boolean property "show-leading_icon" in the layer section, so we
can choose whether the button will have a visible icon or not. You can
also add an instance swap property to the icon to change which icon will
be visible.

Now, select the text, and in the layer section of the sidebar menu add
the boolean property "show-label" (so we can make icon buttons).
In the content section, add the text property "label_text" so you can
change the button label with ease
In the "smaller" variant: set the size of the icon to 16x16px.
Set the text/label size to 14pt and line height to 16pt.
Set the vertical padding in the auto-layout to 8px.
Name the variant as "small".

In the "bigger" variant: set the size of the icon to 24x24px.
Set the text/label size to 18pt and line height to 24pt.
Set the vertical padding in the auto-layout to 12px.
Name the variant as "large".
Is this image is displayed Figma’s left side menu, showing how the components layers should look like. It’s stated that the master component STYLE should have in it’s layers an instance of the component BASE, and the icon and label elements would be inside of it.
The “style” step of the component and it’s layers.
This image shows the Figma’s right side menu, showcasing the size properties that have been just created, each with the correct name: square and round.
The variant’s property name is “style”, and each variant has it own name: square and round.
Here is shown the second step created in the cascading logic, step that controls style.
Base and Style steps of the button component side by side.
Is this image is displayed Figma’s left side menu, showing how the components layers should look like. Now, there is another instance in the layers: the first one is the button component, inside of it there's the style instance that also have the base instance inside, the last one having label and icon elements.
The Button step of the component and it’s layers.
Three states (idle, danger, disabled) of the contained button. The Figma’s right side menu is also in the picture, showing information about state naming.
The button component states.
The button component with both contained and outlined types, with 3 states each: idle, danger and disabled.
The component now have both contained and outline variants, each with 3 states.
The component fully realized with 3 types: contained, outlined and text. Each type has 3 states: idle, danger and disabled.
The button component with all types and states: Contained — Idle
An instance of the button component fully interactable. The button is large, has a rounded style, is outlined with custom icon and label. All possible changes can be seen in Figma’s right side menu.
All the properties the finalized component should have, listed below each step.

4. Final thoughts and considerations

Changing components options on Figma’s right side menu, when done out of order, breaks the component by reverting certain changes. In the image, the button is set to be rounded but changes back to squared after another change is made.
Changes applied out of order “breaks” the component.
Utilizing the right order in Figma’s right side menu (going from top to bottom) ensures that the component respects applied changes. Here no single change is reverted by adding another change.
Changes applied in the right order doesn’t cause issues.

5. Next steps

Written by Bruno Temporim Carneiro

UX/UI Designer with love for both physical and digital worlds.

Responses (12)

Write a response

In a component without a fixed valued element, like the icon, you could apply this step later and have only a single variant in the first step.

--

Interesting solution but slightly over engineered.
Cascading component has too much limitation as the some of the child components are very restricted.
More importantly, the UX of using the component itself should also be considered, if it is a widely…

--

Thank you for structuring this!

I've been intuitively using that method when I started on figma - maybe because of CSS experience - and some colleagues pointed out that they were doing it different. Now I can use your article to explain, and discuss with the team 🎉

--