unplugin / unplugin-icons

🤹 Access thousands of icons as components on-demand universally.
https://www.npmjs.com/package/unplugin-icons
MIT License
3.66k stars 131 forks source link

how to use with other icon lib like xicons ? can you give me a demo #282

Closed WormGirl closed 7 months ago

WormGirl commented 1 year ago

Clear and concise description of the problem

how to use with other icon lib like xicons ? can you give me a demo

Suggested solution

this not work

IconsResolver({
          // 自定义icon解析前缀
          prefix: 'icon',
          // 集合名称过长时可以自定义别名
          alias: {
            cus: 'customCommon',
            app: 'customApp',
            ion: '@vicons/ionicons5'
          },
          customCollections: ['@vicons/ionicons5', 'customCommon', 'customApp']
        }),

Alternative

No response

Additional context

No response

Validations

Norfeldt commented 7 months ago

I'm also struggling to figure out the use other icons than <pixelarticons-*icon name*/> in this https://github.com/antfu/vitesse-webext which uses unplugin-icons. It's really magical how it works.

I wanted to use an icon set like https://icones.netlify.app/collection/fluent-mdl2?s=hide

WormGirl commented 7 months ago

I'm also struggling to figure out the use other icons than <pixelarticons-*icon name*/> in this https://github.com/antfu/vitesse-webext which uses unplugin-icons. It's really magical how it works.

I wanted to use an icon set like https://icones.netlify.app/collection/fluent-mdl2?s=hide

you can install this at https://icon-sets.iconify.design/fluent-mdl2/

yarn add @iconify-json/fluent-mdl2

image