Set custom state based on page width

Hi everyone,
I created a responsive layout for a dashboard that works like this:
When the page is greater than 992px and I open the float menu I set the left margin to 200px on the content group
Otherwise the float menu overlaps the content group.

Now I should make the custom state of the float menu change according to the page width so that on load or resize the menu display is set automatically but I haven’t found the solution to do that.

Can you help me?

Desktop
Mobile


Use a ‘Do when condition is true’ event (the condition being When This page width is…)

then add an action to set the state…

what element should i set this ‘Do when condition is true’?

Not an element…

… a workflow.

Ohh works fine thanks!!!