search

Home  >  Q&A  >  body text

Disable hover effect of v-checkbox in Vuetify 2

<p>When hovering over a v-checkbox in Vuetify 2, a dimmed circle appears behind the checkbox. I want it to not show up. Currently, my v-checkbox is wrapped in v-tab and v-tooltip. I doubt it matters, but it's possible. </p> <pre class="brush:php;toolbar:false;"><v-tab v-for="tab in myTabList" :key="tab"> <span>{{$t(tab)}}</span> <v-tooltip bottom> <template #activator="{ on }"> <span v-on="on"> <v-checkbox @click.stop/> </span> </template> <span>Tooltip text</span> </v-tooltip> </v-tab></pre> <p>I tried wrapping it in v-hover and using the disabled attribute, but with no success. </p>
P粉826429907P粉826429907457 days ago540

reply all(1)I'll reply

  • P粉248602298

    P粉2486022982023-09-04 00:33:24

    This is the ripple effect, you can turn it off using the :ripple property:

    <v-checkbox
      :ripple="false"
      ...
    />
    

    The following is an example:

    new Vue({
      el: '#app',
      vuetify: new Vuetify(),
      data() {
        return {
          myTabList: [1, 2, 3]
        }
      }
    })
    <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/@mdi/font@6.x/css/materialdesignicons.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet">
    
    <div id="app">
      <v-app>
        <v-main>
          <v-container>
            <v-tab v-for="tab in myTabList" :key="tab">
              <span>{{tab}}</span>
              <v-tooltip bottom>
                <template #activator="{ on }">
                  <span v-on="on">
                    <v-checkbox @click.stop :ripple="false"/>
                  </span>
                </template>
                <span>Tooltip text</span>
              </v-tooltip>
            </v-tab>
          </v-container>
        </v-main>
      </v-app>
    </div>
    
    <script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script>

    reply
    0
  • Cancelreply