The issue being faced today:
I want to have preferred values only show up under the instance swap feature. Not searchable in the assets panel, as these are typically sub-components that I don’t want to be used on their own (examples: a dropdown menu used in a global navigation component, the vector for an icon used to instance swap in an actual icon component to control the sizes via icon properties, a single segment used inside a donut chart, pre-configured links or buttons commonly used inside a bigger component to make it easier to select from a pre-set).
Why this isn’t possible:
- Unpublished and hidden components are treated the same in Figma.
- Hiding/unpublishing a component in Figma is currently the only way for it to not show up in the assets panel.
- Hiding/unpublishing a preferred value leads to additional issues:
- Preferred values cannot be selected by library consumers if they are unpublished.
- Preferred values must be published in order for updates to be available to library consumers.
The current workaround (that isn’t that great):
- Leaving preferred values published which means consumers can grab unintended components for use from the assets panel, but this is necessary to continue receiving updates.
- Or not use the preferred value feature in instance swaps, and relying more on creating additional variants with unpublished components that would have been a preferred value. And every time I need to update that component, I must publish, update, then unpublish the component again.
Related threads with this issue:
-
https://forum.figma.com/ask-the-community-7/publish-all-preferred-values-with-hidden-components-35319?tid=35319&fid=7 -
https://forum.figma.com/suggest-a-feature-11/organisation-of-swap-instances-prefered-values-32791 -
https://forum.figma.com/ask-the-community-7/hiding-instance-swap-components-32989?postid=130692#post130692 -
https://forum.figma.com/ask-the-community-7/hide-from-assets-panel-but-show-in-properties-panel-37393?postid=159344#post159344 -
https://forum.figma.com/suggest-a-feature-11/expose-hide-nested-instances-at-component-property-level-24776 - https://forum.figma.com/archive%2D21/hidden%2Dcomponent%2Dstill%2Dvisible%2D34977