Home

Awesome

<div align="center"> <img src="https://github.com/nag5000/ember-tippy/raw/master/logo.svg" alt="Logo" height="105"> </div> <div align="center"> <h1>Tippy.js for Ember</h1> </div>

npm version CI

This is an Ember wrapper for Tippy.js with easy to use modifier and component.

Compatibility

Dependencies

Installation

ember install ember-tippy

Demo and Usage

This addon provides a modifier {{tippy}} and a component <Tippy>.

Here are some basic usage examples:

<button {{tippy "I'm a Tippy tooltip!"}}>My Button</button>
<button>
  My Button
  <Tippy>I'm a <b>Tippy</b> tooltip!</Tippy>
</button>

You can see the demos and all the examples here: https://nag5000.github.io/ember-tippy/.

Supported Features

ember-tippy supports all tippy.js options.

Singleton is supported via <TippySingleton> component.

Headless Tippy is supported via <TippyHeadless> component.

All the Plugins also should work: just use them the same way as for vanilla tippy.js.

Please see the demos and examples here: https://nag5000.github.io/ember-tippy/.

API

Please see the API.

Build-time Config and Imports

ember-tippy does not import any optional extra stuff from tippy, except Tippy Core CSS.

If you don't want to bundle Tippy Core CSS, you can disable it by using shouldIncludeTippyCoreCss: false in ember-tippy build-time config.

If you want to use tippy's built-in custom themes, arrows or animations, please refer to this example. Configurable bundling of optional extra tippy stuff at build-time could be implemented in the future.

<TippySingleton> also imports createSingleton. If you don't use this component and you are on embroider, it should be tree-shaken.

Below is the ember-tippy build-time config with defaults:

// ember-cli-build.js
let app = new EmberApp(defaults, {
  '@embroider/macros': {
    setConfig: {
      'ember-tippy': {
        shouldIncludeTippyCoreCss: true,
      },
    },
  },
});

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.