Cweili / svelte-fa

Tiny FontAwesome component for Svelte

Home Page:https://cweili.github.io/svelte-fa/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SVG Symbols?

mattzque opened this issue · comments

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?