Programmers don’t draw every state of an interface. They describe the rules, and the states follow. Figma variables let designers work a little more like that.
01From states to rules
A cart with zero, one and many items is usually three frames. With a number variable and a condition, it’s one frame that knows what to show. The design becomes a description of behaviour, not a pile of screenshots.
02Three ideas to borrow
- Variables hold state: is the user signed in, how many items are in the cart, which language is active.
- Conditions decide what happens: if the cart is empty, show the empty state; otherwise show the list.
- Expressions combine values: total = price × quantity, or a label that joins text with a number.
03A small exercise
- Create a number variable called quantity, starting at 1.
- Add a plus and a minus button that change it with Set variable.
- Bind the counter’s text to quantity.
- Add a condition: when quantity is 0, show a “Remove item” message.
04Why it matters
Thinking in rules makes you design the edge cases on purpose, not by accident. It also brings you closer to how engineers build the product, which makes reviews faster and surprises fewer. You don’t need to write code; you need to think in the same shapes.
Next article11 benefits of design systems for designers


