In my <v-toolbar>
component, I want to set a text field search with the icon search prepended:
<v-text-field
solo-inverted
prepend-icon="search"
label="Search"
class="hidden-sm-and-down"
>
</v-text-field>
This works but it gives me this result I do not like:
I do not like it because I want both the text field and icon in white color, so I added the property background-color="white"
to the previous code:
<v-text-field
background-color="white"
solo-inverted
prepend-icon="search"
label="Search"
class="hidden-sm-and-down"
>
</v-text-field>
This gives me half of what I want:
How can change the color of that icon into white?
I did some search on Vuetify.js API but could not see an appropriate option there.
Had a similar problem. So I show as example the color-picker with vuetify
<v-menu
v-model="menu"
:close-on-content-click="false"
transition="scale-transition"
>
<v-text-field
slot="activator"
v-model="newClass.color.hex"
label="color"
readonly
>
<v-icon slot="prepend" :color="newClass.color.hex">
format_color_fill
</v-icon>
</v-text-field>
<material-picker v-model="newClass.color" />
</v-menu>
You can override icon color by class
OR
You can use v-text-field
class to override icon color, for example:
.hidden-sm-and-down .v-icon {
color: white !important;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With