carloskiki / leptos-icons

An icon library for the leptos web framework
MIT License
83 stars 16 forks source link

Using icons from iconify/Icônes #39

Open Boscop opened 5 months ago

Boscop commented 5 months ago

https://icones.js.org is based on https://github.com/iconify/iconify / https://iconify.design

All popular icon sets, one framework. Over 200,000 open source vector icons.

Universal icon framework. One syntax for FontAwesome, Material Design Icons, DashIcons, Feather Icons, EmojiOne, Noto Emoji and many other open source icon sets (over 150 icon sets and 200k icons). SVG framework, React, Vue and Svelte components!

Iconify is the most versatile icon framework.

  • Unified icon framework that can be used with any icon library.
  • Out of the box includes 150+ icon sets with more than 200,000 icons.
  • Embed icons in HTML with SVG framework or components for front-end frameworks.
  • Embed icons in designs with plug-ins for Figma, Sketch and Adobe XD.
  • Add icon search to your applications with Iconify Icon Finder.

E.g. the Tamagui Takeout stack template uses these icons. It would be nice to have them available in leptos.

carloskiki commented 5 months ago

Indeed it would, but one major drawback of iconify is that it traditionally requires a runtime in order to add the icons into the js bundle. This could be solved with a proc macro, but it would require the user to have an internet connection in order for the user's code to compile, which is super restrictive. I'm really not a fan of running arbitrary network requests in proc-macros or build scripts, and the rust ecosystem is not thrilled either: https://blog.rust-lang.org/inside-rust/2023/09/01/crates-io-malware-postmortem.html.

I don't find it surprising that react-icons, solid-icons, svelte-icons, etc. don't use iconify, probably for reasons similar to the ones I mentioned above.