Cweili / svelte-fa

Tiny FontAwesome component for Svelte
https://cweili.github.io/svelte-fa/
MIT License
398 stars 24 forks source link

SVG Symbols? #307

Open mattzque opened 9 months ago

mattzque commented 9 months ago

Cool library, thanks!

I think it would be more efficient to use svg symbols, so like <svg><symbol id="dashboard">... somewhere centrally and then <svg><use xlink:href="#dashboard" /></svg> where the icon is used. In cases with lots of (the same) icons and server-side-rendering it can reduce the page size.

To accomplish this we could define a FaContext component that Fa components would talk to using the context API.

Any thoughts?