17

I try to remove underline from v-input, v-text or v-autocomplete fileds in Vuetify, but I couldn't find how

Is there any way to remove underline from v-input, v-text or v-autocomplete fileds in Vuetify.

Sasa Milivojevic
  • 171
  • 1
  • 1
  • 5

3 Answers3

33

On v-text add "solo" and "flat" prop. works on v-input and v-autocomplete.

<v-text-field flat solo></v-text-field>

Flat: description from vuetify documentation "Removes elevation (shadow) added to element when using the solo or solo-inverted props"

There is a playground in vuetify which can help you as well. https://vuetifyjs.com/en/components/text-fields/

Ronin
  • 356
  • 2
  • 4
7

Use the deep selector as discussed here. You have to override the v-input__slot::before class like that:

>>> .v-input__slot::before {
  border-style: none !important;
}

It removes the underlines from the elements you specified in the question. If you do not want to remove all the underlines in a component simultaneously, but only on some specified, do it like that:

.some-style >>> .v-input__slot::before {
  border-style: none !important;
}

And remove the underlines only on the elements of your choice:

<v-text-field class="some-style"></v-text-field>
2

Spend sometime on this one you need to override the before css style

.v-text-field > .v-input__control > .v-input__slot:before {
  border-style: none; 
}
Exec21
  • 797
  • 3
  • 7
  • 23