How to use v-icon in vuetify text-area label instead of text?

Is it possible to use v-icon in vuetify text-area label instead of text? if so what is the best way to do it.

<v-textarea
  outlined
  label="DEMO"
  value="Hello World"
/>

this is what i tried

<v-textarea
  outlined
  label=<v-icon>fas fa-lock</v-icon>
  value="Hello World"
/>

Here is what it looks without icon

enter image description here

Here is what i want

enter image description here

1 answer

  • answered 2019-10-21 19:36 Merouane Boucenna

    You can use slot

    <v-textarea
           outlined
           value="Hello World"
           />
         <template slot="label">
          <v-icon>you icon</v-icon>
        </template>
    
          </v-textarea>