I have a input component with changeable text, this is nested in a component that has it’s own labels around it. When switching between variants of this top-level component, the label text is transferred but the nested inputs’ text is reset.
Being able to pass through the input components text property to the parent component would fix this and make it easier to edit the component. Any properties could do this, surfacing instance selection, visibility - I dont think it should be automatic though, there may be options irrelevant to the component it’s being used in.
+1. Our design system is also running into this issue. We use a couple of sub-libraries that rely on master library components. We would really like nested, or child, component properties to be passed to the parent.
We really want to lean into properties and remove the amount of variants we current have for simple boolean action.
I would love this for boolean properties. I have a component with a boolean property on the visibility of one of its layers, however this component is most commonly a child of other components and I would like the child’s boolean property to bubble up the the parent.
Just as in code one could instantiate a parent component and pass it a boolean value that is then passed to its child component instance.
Not being able to set the text or component or boolean state of nested components is killing me. In some cases I’ve just detached the nested instances so the parent could get the access I need, but that means I don’t get the benefit of updates if the nested component is changed.
It would be so much better if the properties of nested components were “bubbled up” from child to parent to grandparent, etc. You could show them in groups in the Properties section headed by the path to each nested component:
Our design system also have multiple nested component to create bigger components.
We were very surprised to find that the properties of nested components couldn’t be bubbled up to the parent component.
Might be a good Idea, as suggested by @Jenni_Merrifield to display them in the properties tab as groups of some sort.
That way, il would be really handy to tweek the different states of nested components.
I agree with @Ben_Ho that it would be nice to choose which properties to expose to the parent component. Exposing all properties would clutter the parent component with properties I don’t want at that level.
+1 especially with the bonus of choosing what to expose.
Our design system would greatly benefit and reduce the complexity (and duplicates) if we could do this.
In my case I want to have a “master component” and then create different variants from it and use bools to show/hide the relevant properties for that variant. For now I either have that master component but lose the boolean “magic”, or use booleans but have more loose pieces and duplicates.
I’m running into this limitation, too. Being able to expose properties from nested instances is the right direction, but I need to be able to selectively expose properties, rather than an all-or-nothing toggle.