How to create custom Quasar svg Icon Set?
-
Hi there! The latest releases bring to us great stuff, particularly, I mean Quasar svg Icon Sets. But how they create these sets? I’d like to know tyhe way to create the one of my onw icons.
Thanks in advance
-
@ad-ok check the source code on how, here’s one for example https://github.com/quasarframework/quasar/blob/dev/ui/icon-set/svg-mdi-v4.js .
more info from docs https://quasar.dev/options/quasar-icon-sets#Installing-a-Quasar-Icon-Set. -
@metalsadman Thank you for the links. But the doc don’t say how to create icons set, just how to install it. And yes, I’d like to know how to create the file like svg-mdi-v4.js, but with my own icons.
-
@ad-ok the source file is how you register it, you import your icons then assign it to iconSet object, follow like how they did it, save that js file somewhere in your project, and import it maybe in a boot file or at App.vue, and do the one from docs using dynamic setting of iconset ie.
this.$q.iconSet = 'yourIconSet'
. https://quasar.dev/options/quasar-icon-sets#Changing-Icon-Set-Dynamically -
but how to import the icons? I have tens of svg files and need to extract paths and viewports and assign them to some variables, right?
-
Hi @ad-ok did you maybe managed to import the icons set? if you did can you send a snippet of the code so we can see how you did it?