I want to change the theme dynamically. I defined lightTheme
and darkTheme
li
export default createVuetify({ theme: { defaultTheme: "lightTheme", themes: { lightTheme: { dark: false, colors: { primary: "#ad1c3d", "page-header-background": "#d7d7ce", "page-background": "#cdcdc1", "table-header": "#cdcdc1", background: "#c0c0b5", "header-background": "#b5b5a6", "info-text": "#666660", }, }, darkTheme: { dark: true, colors: { primary: "#52E3C2", "page-header-background": "#282831", "page-background": "#32323E", "table-header": "#2e2e2e", background: "#3F3F4A", "header-background": "#4a4a59", "info-text": "#99999F", }, }, }, }, });
I can access the theme using this.$vuetify.theme
, but I can't find how to change the theme at runtime. The way to do this is different in Vuetify 2
. I can't find any examples of Vuetify 3
.
What is the correct way to dynamically change themes in Vuetify 3
?
The documentation seems incorrect. The documentation says to use
but actually