I
I
Ivan2021-10-22 09:54:41
Vue.js
Ivan, 2021-10-22 09:54:41

Is it possible to make a background for the vuetify v-icon component and assign its color?

Hello. There is a component <v-text-field></v-text-field>, it is inserted through the slot <v-icon></v-icon>with the inscription Email.

<v-text-field some_propses>
  <template v-slot:append>
    <v-icon>Email</v-icon>
  </template>
</v-text-field>


61725f13b02de913580823.png

So, is it possible to somehow make the background color where this email inscription is? If so, how. Props colorchanges the color of the letters, but you also need a background

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Aetae, 2021-10-22
@Aetae

Man, have you heard about css?

A
artloveyou, 2021-10-22
@artloveyou

If so, you
617278eb0cbb9097018385.png
can try this

<template>

  <v-text-field some_propses>
    <template v-slot:append>
      <v-icon>Email</v-icon>
    </template>
  </v-text-field>

</template>

<script>
export default {
  data() {
    return {

    }
  }
}
</script>

<style>
.v-text-field > .v-input__control > .v-input__slot {
  background-color: green;
}
</style>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question