JSPM

@dry7/ngx-tippy-wrapper

3.0.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • 0
    • Score
      100M100P100Q33642F
    • License MIT

    Angular 8+ wrapper for Tippy.js

    Package Exports

    • @dry7/ngx-tippy-wrapper

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@dry7/ngx-tippy-wrapper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Logo

    Angular 8+ wrapper for Tippy.js

    Build Status codecov npm GitHub

    Documentation

    Full documentation you can find in repository

    Demo

    Example application

    Code playground

    Installation

    Install from npm:

    npm i ngx-tippy-wrapper --save

    Importing

    Import NgxTippyModule:

    import { NgxTippyModule } from 'ngx-tippy-wrapper';

    Then in your base module:

    @NgModule({
        imports: [
            ...,
            NgxTippyModule
        ],
        ...
    })

    Import tippy.css style file to your main style file:

    @import 'tippy.js/dist/tippy.css';

    or angular.json:

    "architect": {
    "build": {
      ...,
      "options": {
        ...,
        "styles": [..., "./node_modules/tippy.js/dist/tippy.css"]
      }

    Using

    Basic usage

    Apply ngxTippy directive for element and pass content through data-tippy-content attribute:

    <button ngxTippy data-tippy-content="Tooltip content">Element with tooltip</button>

    Applying props

    You can apply props with tippyProps binding

    In template:

    <button
      ngxTippy
      data-tippy-content="Tooltip content"
      [tippyProps]="{
        arrow: false,
        placement: 'bottom'
      }"
    >
      Element with tooltip
    </button>

    Or pass props from component:

    <span ngxTippy data-tippy-content="Tooltip content" [tippyProps]="tippyProps">
      Element with tooltip
    </span>

    ...
    import { NgxTippyProps } from 'ngx-tippy-wrapper';
    
    @Component({ ... })
    export class DemoComponent implements OnInit {
      tippyProps: NgxTippyProps = {
        trigger: 'click',
        allowHTML: true,
      };
      ...
    }