While setting up my components for my component library, I came across an issue. A lot of my components contain instances of other components. To make sure our designers only use the correct components, we use the “_” before the names of nested components when publishing. But this causes the issue where properties of the nested components is hidden in the properties panel of the main component.
For example:
I have a “Dialog” component consisting of a header, a body text and an instance of a “dialog buttons” component. This “dialog buttons” component has multiple variants based on how many buttons should be visible and if they should be stacked or side-by-side. If I hide that nested “dialog buttons” component from publishing, it is not visible in the properties panel of the “Dialog” component when used outside the library. (And yes, I have checked everything from the “Expose nested instances” list)
So, is there a way to hide the “dialog buttons” component from the asset search, but have its properties available in the properties panel of the “Dialog” component?
Also, if I decide to add a different variant to the “dialog buttons” component, is there a way to publish it without having to “unhide” it, publish it, then hide the component and publish again?
This is a topic that gets asked pretty often, and I’ve followed a few threads that seem to have gone nowhere. See:
And others, but the root of the issue is that Figma treats unpublished components the same as hidden components. And if a component is hidden/unpublished, then it does not show up as a preferred value for library consumers to select as a preferred value (since it isn’t published).
I don’t know if Figma has plans to ever address this issue. For now, resorting to giving users awareness that a component you see searchable in assets is actually an “ingredient” or an “atom/molecule” and not intended to be used on its own is probably preferable. Or you can go the route another commenter said where they put some sort of icon to notify people before they use a component in their file. However, this does mean that the icon would also show up in the preferred values. So be aware.
A separate but related issue is that unpublished/hidden components don’t get updated when you publish library updates. So you will need to make it unhidden or publish these “ingredients” or “atoms/molecules” every time an update happens to it. And then re-hide/re-unpublish it again. An understandably frustrating experience
Another note: this topic has inspired me to create a megathread for these experiences, under suggest a feature. So hopefully, with more interest, this idea can gain more traction:
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.