Skip to main content

Pass properties to nested components


GrandPM

I know there have been threads regarding this before but none of them seem active at the moment so I wanted to bring it up again. This is a major pain point when working with design systems that are intended to match code 1:1.

As an example, I got a component that has an “id” text property that is supposed to apply to a nested text label component in one state, and to a nested button component in another state. Using the “expose properties from nested instances” cannot be used in this case because the property would not persist when the state changes. When using a modular design system it is also quite common that the original property belongs to a sub component of a sub component, making it very inconvenient to use the “expose properties” approach.

Additionally, passing properties is a common pattern in code. Features like variables in Figma pave the way for building component libraries that more closely match code. But that also increases the need to be able to set up components and properties more similar to code.

0 replies

Be the first to reply!

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