swissup/module-tippyjs 1.1.0

Highly customizable vanilla JS tooltip/popover library for Magento 2

Type

magento2-module

License

MIT

Requires

None

Requires (dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

Tippyjs

Tippyjs - is a Magento2 module that integrates Tippy library into Magento.

Installation

cd <magento_root>
composer require swissup/tippyjs
bin/magento module:enable Swissup_Tippyjs
bin/magento setup:upgrade

Usage

Basic example:

require(['tippy'], function (tippy) {
    // Tippify all titled elements
    tippy('[title]')
});

See all available options at official site: https://atomiks.github.io/tippyjs/#all-options

Advanced example (works for dynamically added elements):

require([
    'Magento_Ui/js/lib/view/utils/async',
    'tippy'
], function ($, tippy) {
    $.async('[title]', function (el) {
        tippy(el)
    });
});