[Vuejs]-How to apply my custom theme's color to a Vuetify switch component?

0👍

while you are creating the theme you are not setting it as the default theme as shown in the documentation here

below example should work for you

import { createApp } from 'vue'
import { createVuetify, ThemeDefinition } from 'vuetify'

const myTheme = {
  dark: true,
  colors: {
    background: '#212126',
    surface: '#000',
    primary: '#fd8118',
    // more colors
  },
}

export default createVuetify({
  theme: {
    defaultTheme: 'myTheme',
    themes: {
      myCustomLightTheme,
    }
  }
})

Leave a comment