1.0.9 • Published 6 years ago

v-poptool v1.0.9

Weekly downloads
12
License
MIT
Repository
github
Last release
6 years ago

Getting started

This is a tooltip component for VueJS 2.x

Note: The tooltip will automatically position itself based on the position of the hovered element in the page, as shown on the gif below:

Example

  1. Install the Component:
npm install --save v-poptool
  1. Register the Component to your app:
import Vue from 'vue'
import Vtooltip from 'v-poptool'

components: {
    Vtooltip
}

Usage

  1. Add the component wherever you need it.
<vtooltip>
    <div slot="content">This is what goes inside the tooltip</div>
    <div slot="tooltip-text">Hover over me</div>
</vtooltip>

Options

OptionDescriptionValueDefault
colortext color of the tooltipString#FFF
backgroundColorbackground color of the tooltipString#000
fontSizefont size of the tooltipNumber10
textAligntext alignment within the tooltipStringleft
arrowPlacementposition of the tooltip's arrowStringleft
hOffsethorizontal offset of the tooltipNumber0
vOffsetvertical offset of the tooltipNumber0
arrowOffsethorizontal offset of the arrowNumber0

Options Example:

<vtooltip :options="{
	color: 'red',
    backgroundColor: '#DDD',
    fontSize: 16,
    textAlign: 'center',
    arrowPlacement: 'right',
    hOffset: 10,
    Voffset: 2,
    arrowOffset: 15
}">
    <div slot="content">This is a tooltip with custom options</div>
    <div slot="tooltip-text">Hover over me</div>
</vtooltip>

Build the example

Go to the examples folder and run npm run dev

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago