Memory usage: "Boolean property" vs "Variants"

This document states that the hidden layer consumes memory.

Hidden layers are a big contributor to memory usage. This is because Figma needs to store and render information about those layers even when they’re not visible.

Thus, we suspect that the Boolean property only hides elements and consumes more memory than creating two variants, one with elements and one without.

Which actually consumes less memory?


Confirming that in the example here, now with the boolean property you should actually see memory savings.

Even though boolean property also uses hidden layers, it still should net-net reduce the total number of variants and layers needed in a design system, thus improving the file’s memory usage.

For example for the button component set that’s built using just variants and variant properties: It includes two variants to represent the button’s two states. This component set has a total of seven layers (one component set layer, two variant layers, and four nested layers).

But if we use boolean properties instead, we need only one component and a boolean property applied to the icon to toggle its visibility. So this version has a total of three layers (one component layer and two nested layers).

With over 50% reduction in layers, there should also be more efficient file memory usage.

Also see our updated Help Center here.

1 Like

Thanks for explaining it this way, I hadn’t thought about it like this before!

1 Like