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.