tooltip.js

  • Version 1.3.3
  • Published
  • 220 kB
  • 1 dependency
  • MIT license

Install

npm i tooltip.js
yarn add tooltip.js
pnpm add tooltip.js

Overview

A kickass library to create tooltips, based on Popper.js

Index

Classes

class Tooltip

class Tooltip {}

    constructor

    constructor(reference: HTMLElement, options: Options);

      method dispose

      dispose: () => void;

        method hide

        hide: () => void;

          method show

          show: () => void;

            method toggle

            toggle: () => void;

              method updateTitleContent

              updateTitleContent: (title: string | HTMLElement) => void;

                Interfaces

                interface Options

                interface Options {}

                  property arrowSelector

                  arrowSelector?: string;

                    property boundariesElement

                    boundariesElement?: Boundary | HTMLElement;

                      property closeOnClickOutside

                      closeOnClickOutside?: boolean;

                        property container

                        container?: HTMLElement | string;

                          property delay

                          delay?: number | Delay;

                            property html

                            html?: boolean;

                              property innerSelector

                              innerSelector?: string;

                                property offset

                                offset?: number | string;

                                  property placement

                                  placement?: Placement;

                                    property popperOptions

                                    popperOptions?: PopperOptions;

                                      property template

                                      template?: string;

                                        property title

                                        title?: string | HTMLElement | TitleFunction;

                                          property trigger

                                          trigger?: string;
                                          • available options are click, hover, focus, manual required to form a space delimited string e.g. 'hover focus'

                                          Type Aliases

                                          type Delay

                                          type Delay = Record<'show' | 'hide', number>;

                                            type TitleFunction

                                            type TitleFunction = () => string;

                                              Package Files (1)

                                              Dependencies (1)

                                              Dev Dependencies (7)

                                              Peer Dependencies (0)

                                              No peer dependencies.

                                              Badge

                                              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/tooltip.js.

                                              • Markdown
                                                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/tooltip.js)
                                              • HTML
                                                <a href="https://www.jsdocs.io/package/tooltip.js"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>