1.0.0 • Published 7 years ago

i-tooltip v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

i-tooltip is a simplistic tooltip inspired in Material Design specs.

Installation

Install via npm

npm install i-tooltip --save

Import or require in your code:

import Vue from 'vue';
import iTooltip from 'i-tooltip';

// OR

var Vue = require('vue');
var iTooltip = require('i-tooltip');

Module

import iTooltip from 'i-tooltip';

// ...

export default {
  // ...
  components: {
    'my-awesome-tooltip': iTooltip,
  },
  // ...
};

Browser

<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="dist/i-tooltip.min.js"></script>
<script>
Vue.use(iTooltip);

new Vue({
  el: '#app'
});
</script>

Usage

It's very useful to use i-tooltip you only need to register then :smile: seems like with

<i-tooltip>Hello, I'm a Tooltip</i-tooltip>

You only need to pass a string with text from Tooltip, you also can chance tooltip position with is-position property.

Position

@type {String}

Avaliable options:

  • top
  • left
  • right
  • bottom
<i-tooltip is-position="left">
  Tooltip Text
</i-tooltip>

Default is top.

Z-Index

@type {String}

You only need to pass a z-index if you want change it.

<i-tooltip is-z-index="50">
  Tooltip Text
</i-tooltip>

Default is 100.