[Vuejs]-Unable to add custom color in vuetify project

0👍

Try something like that:

// src/plugins/vuetify.js
import Vue from 'vue';
import Vuetify from 'vuetify/lib';

Vue.use(Vuetify);

export default new Vuetify({
  theme: {
    themes: {
      light: {
        custom: '#05a334',
      },
    },
  },
});

// src/main.js
import Vue from 'vue'
import App from './app.vue'
import vuetify from './plugins/vuetify';

Vue.config.productionTip = false

new Vue({
  vuetify,
  render: h => h(App)
}).$mount('#app')
<template>
  <v-app>
    <div>
      <v-btn color="custom">Test</v-btn>
    </div>
  </v-app>
</template>

<script>
export default {
  name: 'app',
};
</script>

Leave a comment