Link Boolean with Layer Variable

Hi There, sorry if this is repeated feedback but I tried to search for it and couldn’t find one that matched exactly what I wanted to share.

I am working on a component that is basically a ListItem with a padding of 12px. But this component has a boolean toggle to activate a secondary line of text and when this happens the padding should be 24px. To do this I have created a variable to change the padding size, but I have to change this manually when toggling on the secondary text line.

The suggestion would be to have the Layer Variable directly on the Boolean Property panel so we can link a toggle with the layer variable for this scenario. Like in the screenshot.

If this is already possible to do let me know how :slight_smile: but since I couldn’t find a way to do it I decided to open this suggestion thread.

Screenshot 2023-10-12 at 15.22.53

Thank you!

1 Like

Note: I know I can use the variable booleans to show content and change the padding, but will be always linked, but here is the other way around. I want to toggle the feature and influence the padding, but I can still change the padding to 12 if needed, and with the boolean variable the padding and content will always be attached.

1 Like

Hi @Sergio_Miguel, I appreciate your question. I have run into this as well. I am trying to have a Property control the state of a Layer variable. Did you find out if this is possible?

Thanks.

So I just tried playing with Variants, and that seems to allow it. Not sure if that is the cleanest way to do it, but maybe that will work for you?