Code Monkey home page Code Monkey logo

Comments (4)

TechAkayy avatar TechAkayy commented on June 1, 2024 1

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.

ElMassimo avatar ElMassimo commented on June 1, 2024 1

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.

ElMassimo avatar ElMassimo commented on June 1, 2024

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.

TechAkayy avatar TechAkayy commented on June 1, 2024

AFAIK, Iconify already provides some robust utilities to load custom icons.

from iles.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.