Skip to content

iamkentleom/tooltips-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TooltipsJS

TooltipsJS is a javascript library for adding tooltips in your website. It is lightweight and easy to use.

Installation

Using npm

npm install tooltips-js --save
<script src="./path/to/tooltips-js.min.js"></script>

Using cdn

<script src="https://cdn.jsdelivr.net/npm/tooltips-js@1.0.6/src/tooltips-js.min.js"></script>

Basic Usage

Create a tooltip

<button id='example'>Hover to display tooltip</button>
<script>
	new Tooltip(document.getElementById('example'), {
		label: "Tooltip example", // Label *required
		position: "top", // (top or bottom) *default: top
		color: "green" // (color names, hex, rgb()) *default: #444
	})
</script>

License

MIT License

About

A javascript library for adding tooltips in your website

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published