Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Put margins on v-tooltip

I have a text that displays when I hover a button.
What I’d like is to set the tooltip a bit away from the button (without changing the button’s size) because at the moment, it’s appearing a bit on the button, they are way too close together.

<v-btn
  v-if="
    crosshairToggle &&
    (tn.length > 10 || tn.length == 0)"
  elevation="0"
  id="zoom_out"
  ref="zoomout"
  class="zmbtn minus"
  dark
  width="45px"
>
  <v-tooltip 
    right 
    open-delay="500"
  >
    <template v-slot:activator="{ on }">
      <v-icon v-on="on" class="zoom-icon" :color="textLightGrey">
        mdi-image-filter-center-focus
      </v-icon>
    </template>
  <span>Focus Mode - Enables when 10 or less actors are mapped</span>
</v-tooltip>

And since the tooltip is only appearing when I’m hovering the button, I can’t inspect it. Does anyone know how to set margins on tooltips ?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

I believe the prop you are looking for is nudge-top (or nudge-bottom). Take a look at the v-tooltip API page.

Example:

<v-tooltip 
    right 
    open-delay="500"
    :nudge-top="-50"
>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading