Skip to main content
Solved

Constraints of Components


scotchline

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

Best answer by Gleb

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

View original

6 replies

Gleb
  • Power Member
  • 4707 replies
  • March 15, 2021

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.


scotchline
  • Author
  • 2 replies
  • March 15, 2021

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


Gleb
  • Power Member
  • 4707 replies
  • Answer
  • March 15, 2021

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


scotchline
  • Author
  • 2 replies
  • March 16, 2021

Thank you!!!


Sergio_Stone

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?


Gleb
  • Power Member
  • 4707 replies
  • July 19, 2021

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings