1.4.8 • Published 10 months ago

vue-autotooltip v1.4.8

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

vue-autotooltip

Auto tooltip for Vue.js

Features

  • Autotooltip directive.
VersionSupport Vue VersionStatus
v1.xv2.7.x✔️
-v3.2.x🚧

Installation

# pnpm
$ pnpm add vue-autotooltip

# yarn
$ yarn add vue-autotooltip

# npm
$ npm i vue-autotooltip

Usage

  1. Import styles
import 'vue-autotooltip/dist/style.css'
  1. Install directive
import Vue from 'vue'
import { Autotooltip } from 'vue-autotooltip'

// ...

Vue.directive('autotooltip', Autotooltip)

// ...
  1. Use it where needed
<div>
  <span v-autotooltip>tooltip content 2</span>
</div>

Binding Value

Has binding value

  • If the binding value is a string, it will be used by content of tooltip.
  • If the binding value is a plain object, It will be considered as an advanced configuration for tooltip.

Configuration details as belows:

KeyTypeDefault ValueDescription
contentstringundefinedContent of tooltip.
effectdark / lightdarkTooltip theme.
placementstringtopPosition of Tooltip.
appendTostring / HTMLElementdocument.bodyWhere to insert the tooltip element.
arrowWidthnumber8Specify the arrow width of tooltip.
showArrowbooleantrueSpecify whether to display arrows.

Has not binding value

  • If a binding value is not specified for v-autotooltip, the innerText of the referenced element will be displayed as the content of the tooltip.
  • Only when there is a text overflow will the display of tooltip be activated, and add a truncation effect to the text display.
1.2.0

1 year ago

1.4.6

1 year ago

1.4.5

1 year ago

1.4.4

1 year ago

1.4.3

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.3.2

1 year ago

1.4.0

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.4.8

10 months ago

1.4.7

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago