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: