
It includes two variants to represent the button's two states: with icon and no icon. In the example below, we created a button component set without using boolean properties. This also improves memory usage in files with instances of these variants, because Figma loads the entire component set to enable switching between variants. Boolean properties are a type of component property that allows you to toggle a property, such as layer visibility, on and off.Įven though this method uses hidden layers, it reduces the number of variants and layers needed in a design system, thus improving the file’s memory usage. If you're using hidden layers to switch between different variations of a component, we recommend creating boolean properties instead. This is because Figma needs to store and render information about those layers even when they're not visible.

Hidden layers are a big contributor to memory usage.

Figma uses this memory to render layers and objects on the canvas, as well as deliver the collaborative multiplayer experience. Note: We're using the term memory very generally here, but the memory usage banners are only triggered by WASM memory (WebAssembly.Memory) usage.
