I was reading the Vuetify documentation and it seems you can create two themes like so:
const vuetify = new Vuetify({
theme: {
themes: {
light: {
primary: colors.purple,
secondary: colors.grey.darken1,
},
dark: {
primary: colors.blue.lighten3,
},
},
},
})
And then is possible to use it by: this.$vuetify.theme.dark = true
Is it possible to add another theme? Kind of like this:
const vuetify = new Vuetify({
theme: {
themes: {
light: {
primary: colors.purple,
secondary: colors.grey.darken1,
},
dark: {
primary: colors.blue.lighten3,
},
anotherTheme: {
primary: colors.grey,
secondary: colors.black,
}
},
},
})
And if it is how can I change to it programmatically?
According to https://github.com/vuetifyjs/vuetify/issues/10985,
you'll probably be able to manage multiple themes from there with Vuetify v3.
For now, you could create your theme manager using a Vuex store.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With