I want to change the theme dynamically. I definedlightTheme
anddarkTheme
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 usingthis.$vuetify.theme
, but I can't find how to change the theme at runtime. The way to do this is different inVuetify 2
. I can't find any examples ofVuetify 3
.
What is the correct way to dynamically change themes inVuetify 3
?
The documentation seems incorrect. The documentation says to use
but actually