JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 126970
  • Score
    100M100P100Q164403F
  • License MIT

Floating tooltip component

Package Exports

  • float-tooltip

Readme

Floating Tooltip

NPM package Build Size NPM Downloads

A floating tooltip JS component.

Quick start

import Tooltip from 'float-tooltip';

or using a script tag

<script src="//unpkg.com/float-tooltip"></script>

then

const myTooltip = new Tooltip(<triggerDOMElement>)
  .content('<div>Hello World!</div>');

API reference

Initialisation

new Tooltip(<containerDomElement>, { configOptions })
Config options Description Default
style: object A custom style object apply to the tooltip and override the default style. -

Methods

Method Description Default
content([string]) Specify the content of the tooltip. Supports plain text or HTML content. If a falsy value is supplied the tooltip will automatically hide. false

Giving Back

paypal If this project has helped you and you'd like to contribute back, you can always buy me a ☕!