Skip to main content
Niclas_Lundberg
March 19, 2024

Feature: If < min-width => change-to variant

  • March 19, 2024
  • 10 replies
  • 1051 views

It would indeed be game changing and important if we could get the option to automatically swap between variants based on the actual size of the parent frame. This could simulate real life complete web applications and be really helpful to show when and how a breakpoint should interfere with a component.

10 replies

djv
Figmate
Community Support
March 20, 2024

Hey @Niclas_Lundberg, thanks for the feedback!

We’ve updated your topic into a feature request, and we’ll pass this onto our Prototyping team for future consideration.

Joseph_Van_Geffen
March 21, 2024

I second this feature as it would be a huge leg-up using FIGMA for responsive designs.

Shaul_Vainblat
March 25, 2024

@Niclas_Lundberg you can do that with variables and conditions.
variable for min width and a variable that control the state of a component and a condition:
if “frame-min-width” == “number” then set variable to…

Niclas_Lundberg
March 25, 2024

Yes, I guess that makes sense

Where would I apply this condition, as, as far as I can tell, the only possible way to “trigger” conditions is by input - there arent any “listeners” if you know what I mean

Would love your input to I can learn how to apply this and step up my responsive game

Shaul_Vainblat
March 25, 2024

@Niclas_Lundberg you can create an event listener by creating a pixel component with two states(can be 0% opacity), the states switch with a delay interaction in an instant.
only on one pixel variant you will need to place all your conditions.

Screenshot 2024-03-25 at 15.41.56



Screenshot 2024-03-25 at 15.48.48

Niclas_Lundberg
March 25, 2024

Oh I see, sort of lika null object just to hold information!

Thanks!

Jeffro
New Member
November 13, 2024

Hi Shaul, do you have any examples of this working? I’m having a hard time connecting this concept. I don’t understand where or how to set the variables for the frame width.

Shaul_Vainblat
November 13, 2024

Hey @Jeffro, the main idea is to have a component in your main framework that continuously loops, checks conditions, and makes the necessary changes.

where/how to set a variable: first you need a variable that controls the state of your change. the variable needs to be in the type of the field that you need to change, example: width field is a number variable.
check here for more info https://help.figma.com/hc/en-us/articles/15343107263511-Apply-variables-to-designs

Laurens_Kemp
New Member
August 14, 2025

 

@Niclas_Lundberg you can do that with variables and conditions.
variable for min width and a variable that control the state of a component and a condition:
if “frame-min-width” == “number” then set variable to…

Bumping this thread; the suggested solutions using variables and conditionals still doesn't allow to tap into the current size of a frame, in the sense that you can manually resize it (like you can do with a browser window). It might be really useful if it was possible to use a frame size (like the width) in conditional statements of prototypes. 

Wirta
New Member
January 16, 2026

Bumping this thread; When can we expect this feature? Adding a simple “Window width” trigger to prototype interactions would be a game changer. Proper responsive design is not possible without in figma.