# ng-tippy

> NgTippy is an Angular 6+ wrapper directive for Tippy.js

Latest version **3.2.2** (published 2018-09-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install ng-tippy
pnpm add ng-tippy
yarn add ng-tippy
bun add ng-tippy
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.2.2 |
| Published | 2018-09-15 |
| First published | 2018-08-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 84.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Thabo Ngubane |
| Maintainers | teebo_ |
| Keywords | tippy, tippy.js, ng-tippy, angular-tippy, tooltips, ngx-tippy, ngx-tooltips |

## Links

- npm: https://www.npmjs.com/package/ng-tippy
- Repository: https://github.com/Teebo/ng-tippy
- Homepage: https://github.com/Teebo/ng-tippy#readme
- Issues: https://github.com/Teebo/ng-tippy/issues
- npm.io page: https://npm.io/package/ng-tippy

## Dependencies (2)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0
- [tippy.js](https://npm.io/package/tippy.js.md) ^2.5.4

## Recent versions

- 3.2.2 (latest) — 2018-09-15
- 3.2.1 — 2018-09-15
- 3.2.0 — 2018-09-15
- 3.1.4 — 2018-09-07
- 3.1.3 — 2018-09-07
- 3.1.2 — 2018-08-14
- 3.1.0 — 2018-08-13
- 3.0.1 — 2018-08-13
- 3.0.0 — 2018-08-13
- 2.1.1 — 2018-08-12
- 2.1.0 — 2018-08-11
- 1.0.0 — 2018-08-11
- 2.0.0 — 2018-08-11
- 1.1.0 — 2018-08-11
- 1.0.1 — 2018-08-11
- … 1 more at https://npm.io/package/ng-tippy/versions

## README

# NgTippy

NgTippy is an Angular 6+ wrapper directive for Tippy.js

## Installation

```
npm i ng-tippy
```

# Usage
 
Import in app.module.ts

```javascript
...
import { TippyModule } from 'ng-tippy';
... 

imports: [ TippyModule ]
```

# Basic

```html
<input title="I am a tooltip" appTippy>show on mouseover or hoverover</input>
```

# With options

```html
<input title="I am a tooltip" appTippy [tippyOptions]="{arrow: true}">
  show on mouseover or hoverover
</input>
```

# With custom template

```html
<div id="myCustomTemplate"></div>

<input title="I am a tooltip" appTippy [tippyOptions]="{html: '#myCustomTemplate'}">
 show on mouseover or hoverover
</input>
```

# Using the Tippy service

```javascript
...
import { TippyService } from 'ng-tippy';
...
  constructor(private tippyService: TippyService) { }

    ngOnInit(): void {
    setTimeout(() => {
      // provide the name of the tippy that you have defined in your template
      this.tippyService.hideTippy('tippy');
    }, 5000);
  }
```
  The template example

```html

<div id="my-tooltip-template" style="text-align:center;display: none;">
  <h1>
    Welcome to {{ title }}!
  </h1>
  <img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
</div>

<div style="width:400px; height:400px; border: 1px solid black;" type="text" appTippy [tippyOptions]="{
  arrow: true,
  name: 'tippy',
  interactive: true,
  html:'#my-tooltip-template',
  createPopperInstanceOnInit: true
}">
 Mouse-Enter or Hover-Over
</div>
```

---
_Source: https://npm.io/package/ng-tippy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
