Skip to main content

I have created a component in which a button is to be right-aligned on klick. No matter what I do, it remains left-aligned.


It depends on the contex of your design but this is the kind of setting you need to apply to the component instance and not the main component itself.



image


Unfortunately, this has no effect. The button should be directly next to the cookie banner when collapsed.


Yeah, you definitely need to look deeper at constrains and auto layout settings. Seems like right now you simply don’t understand those concepts


As Pavel said, you need to use auto layout.

E.g. http://clippp.co/sharex/nXKto3glLU.mp4


Thank you for your tips. I haven’t quite figured out how the autolayout works, but I have managed to get the effect right.