Light/Dark HTML5 Tooltip Library – minitooltip

Category: Javascript , Tooltip | September 26, 2018
Author:leocamelo
Views Total:105 views
Official Page:Go to website
Last Update:September 26, 2018
License:MIT

Preview:

Light/Dark HTML5 Tooltip Library – minitooltip

Description:

minitooltip is a pure JS solution to create customizable html5 tooltips using either data attributes or CSS classes.

Installation:

# Yarn
$ yarn add minitooltip
# NPM
$ npm install minitooltip --save

How to use it:

Add the minitooltip.css to the head section of the html page.

<script src="minitooltip.min.js"></script>

Append a default tooltip to the target DOM elements using HTML5 data-tip attribute:

<span data-tip="Tooltip Content">Hover Me</span>

Or using CSS class and title attribute:

<span class="tip" title="Tooltip Content">Hover Me</span>

Change the position of your tooltip.

<span data-tip="Tooltip Content" data-tip-position="down">Hover Me</span>
<span class="tip-down" title="Tooltip Content">Hover Me</span>

Set the tooltip theme to ‘light’.

<span data-tip="Tooltip Content" data-tip-theme="light">Hover Me</span>
<span class="tip-down tip-light" title="Tooltip Content">Hover Me</span>

Changelog:

09/26/2018

  • v0.2.8

You Might Be Interested In:


Leave a Reply