Select the icons you want or just click âGenerate for allâ to create json&css for the whole set. Keep in mind that Iconify API has limits for the url length. I havenât tested this limit, but if you see nothing in the outputs â try to select less.
Create a new iconset: Press âAdd Iconsâ, enter setâs name, paste css url from the step 6 to the second field, .json to third field. Click âAddâ.
P.S. WeWeb sometimes discards all the icon sets after you add yours. The script can still be buggy and requires some homework, but it works.
P.P.S. @Joyce@Alexis please change the css of âHero Iconsâ, remove/change this:
[class^="icon-"],
[class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: "heroicons" !important;
maybe you shouldnât bind any icon- class to heroicons. Iâll create a ticket. Many iconify icons will be broken because of this. Iâve made a workaround in my script, but it shouldnât be there. Most Iconify classes start with icon-.
UPD: Now you can insert a css and convert to WeWeb Json.
Please remember that my algorhytm is trying to find longest and most popular (>50%) prefix, so for the css like this it will be .ph-bold.ph-airplane-:
Hey,
thank you so much for this!
I am advocating for iconify internally for so long now
I am still hopping than one day it will be natively support by WeWeb
I was trying to insert new icon packs and simply the native icons disappeared from the list, removing all the icons I had previously used. Is there any way to recover the default icons? The same thing happened with the fonts.
My tool has one main problem: icons, imported this way canât be colored. Iâve tried to replace âblackâ fill to âcurrentColorâ as SVG theoretically supports it.
It didnât work either as background or via subclass â:beforeâ in CSS.
MAYBE Iâll make another tool for the font based icons. For myself and share.
Iconify API generates bad CSS sometimes. Like double classnames or fixed size for icons.
I think that Iconify plugin for Figma works different way to show all the icons correctly.
Yes, and sometimes WeWeb shows only one icon (number of icons at the list) after you import the icons (for example for the full âFlat UIâ iconset).
Iâve created a new clean project and didnât got this problem, a list of native icons is loaded, but with a very huge delay.
Is there a limit to how many this can generate for? Some of them such as Phosphor and HeroIcons donât do anything when you select âGenerate for Allâ
If you use an option to generate from a Iconify collection, youâre limited to the API query size, some iconsets brake on this. If you use it just as converter (and itâs more preferrable if we speak about font-based iconsets like phosphor), youâre limited only by your RAM.
I followed the instructions and it worked perfectly.
As youâve kindly added the ability to change colours, Iâve gone added a 2nd set of âfeather iconsâ. However, theyâre now both blank? Iâm pulling a blank too!
I can check this particular set of icons, my new addition just replaces the âfillâ and âstrokeâ arguments in the generated CSS. So you can try to replace those values yourself and check if it works the same way. Mistakes are possible. Some icon fonts have more than one color, and in this case, you should be careful of what youâre changing.