Exporting all Variants at once?

I’m currently working with a lot of icons.
I’ve made the icons into components and have grouped the variants.
I can export an individual component, but when I click on a variant group, the resulting export is a single image with all the variants. How can I export individual PNG/SVGs of all the variants within each group?

When you have set the export settings, you can select nothing (or deselect everything :man_shrugging:) and Cmd Shift E to export everything that you have set as exportable.

:warning: Still, I don’t recommend you to use variants for icons and exports. You’ll lose the search functionality and you’ll get some weird naming for the export.

I appreciate the response, Andrei.

I should have said logos instead of icons. I’m dealing with 30 distinct logos, each with an OnLight/OnDark/Inactive variant. As far as organizing the asset panel - I find it is cleanest to group each logo with its variants - but if I’m ever asked to export all of them, it’ll become a pain with the naming issue.

:wave:Hey @Nick_Gertonson ,

I didn’t check forum for a while, so is possible that my response to be late. :pensive:

Here is how you can use variants for asset and also to have what name you like.

Note that this is just an example, you can use on whatever you want.

Btw, if you can use SVG in code, then I recommend you to give only 1 asset as SVG and ask your colleagues to make the logic in code for light/dark as they can modify SVG code using CSS or JS.

2 Likes