antfu-collective / icones

⚡️ Icon Explorer with Instant searching, powered by Iconify

Home Page:https://icones.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feat: export multiple icons as symbol

ijkml opened this issue · comments

commented

Clear and concise description of the problem

After adding some icons to bag, there are options to download as icon font or svg zip. The "Export as symbols" options should download an svg file containing the symbols of each icon.

Suggested solution

Currently, I haven't checked, but I'd be willing to implement this if pointed in the right direction.
The svg file would look like this:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <defs>
    <symbol id="icon-name-1" viewBox="0 0 2048 2048">
      <!-- icon here -->
    </symbol>
    <symbol viewBox="0 0 32 32" id="cib-facebook-f">
      <path fill="currentColor" d="..." />
    </symbol>
  </defs>
</svg>

Alternative

Copy svg symbol one by one

Additional context

No response

Validations

This would be a great addition. Much more handy than generating symbols one at a time.