Question: Icon behavior? #5
Replies: 2 comments
-
Thanks for your interest in this template, @jmarshall9120 ! pnpm install -D @mdi/js new Vuetify ({
/* ... */
icons: {
iconfont: 'mdiSvg', // not 'mdi' here
values: {
...icons,
},
}
} But the con is that icons need to be registered manually. You need to import // src/plugins/icons.ts
import {
mdiAlert,
mdiEye,
mdiEyeOff,
mdiBell,
/* other icons ... */
mdiArrowLeftBold,
} from '@mdi/js'
// icons in `mdi` object will be registered in Vuetify
const mdi = {
mdiAlert,
mdiEye,
mdiEyeOff,
mdiBell,
/* other icons ... */
mdiArrowLeftBold
} Then use <v-icon>$mdi-arrow-left-bold</v-icon> Don't forget the You can also switch back to |
Beta Was this translation helpful? Give feedback.
-
If you are using import '@mdi/font/css/materialdesignicons.css' |
Beta Was this translation helpful? Give feedback.
-
I'm implementing this myself and thought you might be willing to share your wisdom, given your template works so well. There is some sort of interesting interaction between Vuetify and Vite concerning Icons, that I haven't been able to find documented anywhere.
This sort of thing doesn't work anymore after migrating to Vite
I'm playing with your template, but I thought you might be willing to share your understanding here. Its a pretty esoteric little bug.
Beta Was this translation helpful? Give feedback.
All reactions