1.0.3 • Published 3 years ago

vue-easy-tooltip v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

vue-easy-tooltip

Demo

Installation

yarn add vue-easy-tooltip
npm i vue-easy-tooltip

Base usage

<template>
  <button>
    Hover me
    <vue-easy-tooltip>
      I am a tooltip
    </vue-easy-tooltip>
  </button>
</template>

<script>
  import VueEasyTooltip from "vue-easy-tooltip"
  
  components: {
    VueEasyTooltip
  }
</script>

With v-model

<template>
  <button @click="tooltip = !tooltip">
    Click me
    <vue-easy-tooltip v-model="tooltip">
      I am a tooltip
    </vue-easy-tooltip>
  </button>
</template>

<script>
  import VueEasyTooltip from "vue-easy-tooltip"
  
  components: {
    VueEasyTooltip
  },
  
  data: () => ({
    tooltip: false
  })
</script>

Props

NameTypeDefaultDescription
offsetNumber12Number to offset the tooltip vertically in pixels
withArrowBooleanfalseShow tooltip arrow
positionStringbottomPosition of the tooltip relative to its target. Accepted values: top, bottom
backgroundColorString#505050Color tooltip background
classesString''CSS classes for the tooltip
stylesObject{}Object with CSS properties and values for styling the tooltip

Slots

NameDescription
defaultUsed for pass the content