How to change the text color of V-select labels and items
P粉662361740
P粉662361740 2023-08-25 15:05:15
0
1
471
<p>I have been trying to change the text color of v-select labels and items but can't find the corresponding properties to do so, I can change the background color but not the labels or text items inside v-select. Here is sample code: </p> <pre class="brush:php;toolbar:false;"><div id="app"> <v-app id="inspire"> <v-container fluid> <v-row align="center"> <v-col class="d-flex" cols="12" sm="6" > <v-select :items="items" label="Standard" background-color="#000000" color="#ffffff" ></v-select> </v-col> </v-row> </v-container> </v-app> </div></pre>
P粉662361740
P粉662361740

reply all(1)
P粉021708275

You can customize the rendering of labels using the item slot:

<v-select :items="items" label="Standard" background-color="#000000" color="#ffffff">
  <template #item="{item}">
    <span style="color:white; background:blue">{{item.name}}<span>
  </template>
</v-select>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template