Comments (4)
Thanks bunch Max.
The above feature request is a little different to the unplugin-icons way.
For eg, AstroIcon & NuxtIcon, we can specify the icon name as a prop. It's quite useful especially with antfu's vs-code iconify extension (https://github.com/antfu/vscode-iconify). It delivers a great developer experience.
Also, using Icon as a special component has great flexibility and has some advantages over using the unplugin-icons way which many of us have encountered. Here are some related threads - unplugin/unplugin-icons#203, Vuetify
Shipping an IlesIcon component as part of the current @islands/icons module that supports specifying icon-names as props might be a nice win supporting both unplugin-icons & the prop way.
For eg, Nuxt icon is wrapper on top of @iconify/vue component (https://github.com/nuxt-modules/icon/blob/main/src/runtime/Icon.vue). They also have another version called IconCSS (fetches the icon from iconify api at build/ssr time).
from iles.
I like the idea, I think it would make sense to favor this approach in @islands/icons
.
Would like to know whether that approach would support configuring and using custom icons, as that's currently possible with unplugin-icons
with very little effort.
from iles.
Hi 😃
Have you tried @islands/icons
?
It allows you to use any icons, and with auto-import you get tree-shaking out of the box.
Here's an example in the docs.
from iles.
AFAIK, Iconify already provides some robust utilities to load custom icons.
- Unocss/preset-icons use the iconify utils to support custom icons - https://github.com/unocss/unocss/tree/main/packages/preset-icons#nodejs
- NuxtIcon currently doesn't support custom icons explicitly yet, Sebastien suggested using unplugin-icons for this or the third-party nuxt-icons module for now.
- AstroIcon handles local icons using svgo - https://github.com/natemoo-re/astro-icon#local-icons
from iles.
Related Issues (20)
- Expose unplugin-vue-components config to extend resolvers HOT 2
- mdxComponent works in dev but not on build HOT 7
- Hydration issue with client:visible HOT 2
- Auto-install issues HOT 2
- HMR on style updates in pages with islands
- Erroring when adding client directives HOT 7
- Component not rendering when using client:only directive
- Dynamic routes not catching slugs containing '.' HOT 1
- Svelte & jsx/tsx don't render without client directives HOT 1
- Svelte component works with client:load but not with client:visible
- Unable to apply client directive when using Vuetify HOT 3
- TypeScript cannot find a declaration file for module `@islands/icons`
- Issues with peer dependency versions HOT 1
- Rendered pages are blank when building inside monorepo with `pnpm` HOT 1
- Twitter meta tags HOT 1
- iles using a named export from vue/transformer-sfc that does not exist HOT 6
- Client:visible not downloading javascript of dependencies of a component as expected HOT 2
- Error building iles HOT 6
- Importing scripts into Iles HOT 3
- Archive this project? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iles.