1.0.0 • Published 3 years ago

tooltip-js-testing-vue-test v1.0.0

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

vue-js-tooltip

Installation

yarn add tooltip-vue
npm i tooltip-vue

Base usage

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

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

With v-model

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

<script>
  import TooltipVue from "tooltip-vue"
  
  components: {
    TooltipVue
  },
  
  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