Figma Support Forum

Constraints of Components

Hi

I created a button as a main component and added left and right to the constraints. When I used the button I was not able to change the constraints anymore and the predefined left and right… was not working. Any advice what I’m doing wrong or is this an issue?

Best,
Daniel

Can you show an example? If you are trying to change constraints inside of a component instance — that’s not possible, they are inherited from the main component.

Hi Gleb

Thanks for your help. I changed it in the main component… but the left and right is not working when i resize the frame… only if I detach the instance…

Here an exmaple: Figma

Best,
Daniel

The outer constraints set on the component itself and not inside of it are not propagated to instances, so you need to set them manually:
image

Thank you!!!

Hey Gleb,

If I understand your wording correctly, do constraints set within the Component propagate? I thought any constraints put on a higher grouping cascaded down to the inner parts ( e.g. a group of email and password text fields).
Or constraints set on the whole unit before it was turned into a Component?

If that is the case, then something is wrong for me.

Do constraints just not propagate at all via components?

The constraints set within the component propagate like any other properties and objects within the component.