Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vuetify multiple themes

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?

like image 205
jogarcia Avatar asked May 06 '26 18:05

jogarcia


1 Answers

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.

like image 127
dxlliv Avatar answered May 09 '26 07:05

dxlliv



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!