Custom Tooltip Component For Vue.js

Description:

Yet another customizable, reusable, reactive tooltip component for Vue.js.

How to use it:

1. Import and register the custom tooltip component.

import Vue from 'vue'
import VueCustomTooltip from '@adamdehaven/vue-custom-tooltip'
Vue.use(VueCustomTooltip,{
  // OPTIONS HERE
})
// or
export default {
  components: {
    VueCustomTooltip,
  },
}

2. Attach the tooltip to an element you specify.

<VueCustomTooltip label="This is a tooltip">
  Hover Me
</VueCustomTooltip>

3. Available component props.

label: {
  handler(value) {
    this.labelText = value
  },
  immediate: true,
},
active: {
  handler(value) {
    this.isActive = value
  },
  immediate: true,
},
sticky: {
  handler(value) {
    this.isSticky = value
  },
  immediate: true,
},
multiline: {
  handler(value) {
    this.isMultiline = value
  },
  immediate: true,
},
underlined: {
  handler(value) {
    this.isUnderlined = value
  },
  immediate: true,
},
abbreviation: {
  handler(value) {
    this.isAbbreviation = value
  },
  immediate: true,
},
position: {
  // is-top / is-bottom / is-left / is-right
  handler(value) {
    this.hasPosition = value
  },
  immediate: true,
},
size: {
  // is-small / is-medium / is-large
  handler(value) {
    this.hasSize = value
  },
  immediate: true,
},

4. Default options.

Vue.use(VueCustomTooltip, {
  name: 'VueCustomTooltip',
  color: '#fff',
  background: '#000',
  borderRadius: 12,
  fontWeight: 400,
})

Preview:

Custom Tooltip Component For Vue.js

Download Details:

Author: adamdehaven

Live Demo: https://github.com/adamdehaven/vue-custom-tooltip

Download Link: https://github.com/adamdehaven/vue-custom-tooltip/archive/master.zip

Official Website: https://github.com/adamdehaven/vue-custom-tooltip

Install & Download:

# Yarn
$ yarn add @adamdehaven/vue-custom-tooltip

# NPM
$ npm i @adamdehaven/vue-custom-tooltip

You Might Be Interested In:

Add Comment