Tippyjs - Tooltip, popover, dropdown, and menu library

Overview
Tippy.js logo

Tippy.js

The complete tooltip, popover, dropdown, and menu solution for the web

npm Downloads per Month MIT License

Demo and Documentation

➡️ View the latest demo & docs here

Migration Guide

Installation

Package Managers

# npm
npm i tippy.js

# Yarn
yarn add tippy.js

Import the tippy constructor and the core CSS:

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

CDN

<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://unpkg.com/tippy.js@6"></script>

The core CSS comes bundled with the default unpkg import.

Usage

For detailed usage information, visit the docs.

Component Wrappers

License

MIT

Comments
  • [WIP] V5

    [WIP] V5

    Tippy v5

    The main goal of this version is to:

    1. Improve developer experience with warnings without bloating production bundle size
    2. Massively reduce core size and make the library more treeshake-able
    3. Allow new feature additions to be added separately without increasing bundle size
    4. Improve naming consistency and usage

    Highlights

    • ⬇️ 30%+ smaller download size (5.4 kB minzipped including core CSS)
    • ⬇️ 50%+ smaller parse size (15.1 kB minified including core CSS)
    • ⬇️ 60%+ smaller core CSS (0.6 kB minzipped) + smaller external animation files
    • ⚙️ Development and production versions for better developer experience
    • ✨ New animation variations
    • ✨ New touch: ["hold", delay] prop (for long press behavior)
    • ✨ New arrow: string | Element values to use your own shape
    • ✨ New createSingleton method, supersedes group()
    • 🌸 Improved animations integration and documentation, namely fully dynamic transition dimensions when tippy content updates
    • 🌸 Improved naming consistency
    • ♿ Improved accessibility defaults for interactive tippys
    • 🐛 Various minor behavior bug fixes

    Development and production versions of Tippy.js

    We're now adding helpful development warnings without bloating bundle size. Development files are .js, while production versions are .min.js.

    Main filename was renamed from index.all to tippy.bundle for better DevTools display.

    tippy.js/
    ├── dist/
    │   ├── tippy.cjs.js              "main" file
    │   ├── tippy.esm.js              "module" file
    │   ├── tippy-bundle.iife.js              
    │   ├── tippy-bundle.iife.min.js         "unpkg" file
    │   ├── tippy.iife.js              
    │   ├── tippy.iife.min.js
    
    // This whole block will get stripped by minifiers/DCE for production builds
    // When importing like `import tippy from 'tippy.js'`
    if (process.env.NODE_ENV !== 'production') {
      if (somethingBad) {
        console.warn('You did somethingBad');
      }
    }
    

    Where's the umd folder? The browser format is now iife. Node is covered by cjs, and amd is dead and/or didn't work with popper.js/tippy.js anyway before because of the .js suffix apparently (which is what umd covered). Now it's not necessary.

    iife development version includes the block without the Node-only process variable. In the .min version, it's stripped out entirely (like the other formats).


    Drop Android 4.4 support

    Remove all -webkit- prefixed transforms to save 200 minzipped bytes or so.


    Force data-placement and data-out-of-boundaries attributes

    The inconsistency between data-animation and x-placement has been annoying. Since 4.2.0, we've moved these attributes to the .tippy-tooltip node, so we can rename them.


    Default is now arrow: true and animation: 'fade'

    Having animateFill: true and animation: 'shift-away' animation as defaults add a lot of CSS bloat. By making the "bootstrap" tooltip default a lot of code is stripped away.

    Further reasons listed here: https://github.com/atomiks/tippyjs/pull/499#issuecomment-504662996

    import tippy from 'tippy.js';
    import 'tippy.js/dist/backdrop.css';
    import 'tippy.js/animations/shift-away.css';
    
    tippy(targets, {
      content: 'tooltip',
      animateFill: true,
      animation: 'shift-away'
    });
    

    If using a custom SVG arrow, import the SVG arrow CSS

    Again, for treeshaking reasons, not everyone cares about SVG arrows, so will need to import the CSS separately:

    import 'tippy.js/dist/svg-arrow.css';
    

    Delays are always 0 in touch and keyboard contexts

    I don't see a reason to keep delay here, it's poor UX. If people require this to be configured then we can add it later.

    Remove target option and tippy.group() from core

    They've been moved into a file called "addons" to conserve core's size. createSingleton has replaced group since its behavior is better and allows transitions since a single tippy is being used.

    Functions in this bundled file should be treeshaken by bundlers.

    import {delegate, createSingleton} from 'tippy.js';
    
    delegate('#parent', {
      target: 'button'
    });
    
    const singleton = createSingleton(tippy('button'), {
      delay: 500
    });
    

    Move followCursor to plugins

    Like the "addons", props are being moved to separate parts because not everyone needs this behavior.

    import tippy, {followCursor} from 'tippy.js';
    
    tippy.use(followCursor);
    

    Animations

    A ton of work has been gone into considering animations more deeply.

    This includes:

    • CSS transitions (default)
    • CSS animations (e.g. animate.css)
    • JavaScript and spring animations (e.g. animejs)
    • FLIP animations of tippy content (e.g. react-flip-toolkit/core)

    Default CSS animations: shift-toward, scale, perspective animations removed

    Only fade will remain in tippy.css.

    Extra CSS animations will be moved to a folder called animations/ (like themes/); there are now 3 variants of each animation expect for fade (subtle and extreme added).

    Example import:

    import 'tippy.js/animations/shift-away-subtle.css';
    

    CSS animations (instead of transitions - e.g. animate.css)

    We're now using use top/left/right/bottom: 10px as the base distance offset, rather than specifying it in the transform. Makes it more compatible with external animation CSS, FLIP libraries, and removes need for the notransition technique.

    There's no need to think about distance anymore now due to this.

    tippy('button', {
      // `fade` is now just an opacity transition, which is a good base for most
      // animations.
      animation: 'fade',
      onMount(instance) {
        const {tooltip} = instance.popperChildren;
        requestAnimationFrame(() => {
          tooltip.classList.add('animated', 'wobble');
        });
      },
      onHidden(instance) {
        const {tooltip} = instance.popperChildren;
        tooltip.classList.remove('animated', 'wobble');
      }
    });
    

    Dimensions transition

    ⚠️ Highly experimental code. There are tons of edge cases I've had to work out. Hopefully this can be wrapped in a simple addon API.

    gif

    See demo/flip

    Remaining problems:

    • Work out the dynamic clip-path based on the placement needed to prevent content overflowing when the tippy has an arrow (since it can't have overflow: hidden).
    • Work out how to make it fully dynamic, considering .setProps() method.

    Themes

    • google theme was renamed to material, to remove the association with Google.
    • Prevent the need to specify .tippy-tooltip[data-animatefill] .tippy-backdrop selector (to make background-color transparent)

    New lifecycle functions

    • onCreate
    • onUntrigger
    • onPropsUpdated
    • onDestroy

    Virtual reference elements

    Plain objects are not supported anymore - instead, you just pass a placeholder element like this:

    const placeholderElement = document.createElement('div');
    
    // IE9+ supports overriding this method. That's all that's needed for
    // Popper.js to position the tippy.
    //
    // `client{Width,Height}` when 0 (i.e. not appended to the document) do not have an effect,
    // as Popper.js falls back to the dimensions instead
    placeholderElement.getBoundingClientRect = () => ({ ... });
    
    tippy(placeholderElement, options);
    

    This conserves size since we don't need to polyfill element methods in the plain object.

    Auto built index.d.ts

    Internal types don't live in types.ts so now index.d.ts gets generated on build, which is just a copy of src/types.ts.

    Naming

    The term "options" is being completely ditched in favor of "props" everywhere. And now consistent methods:

    • instance.set() was renamed to instance.setProps()
    • tippy.defaults was renamed to tippy.defaultProps
    • tippy.setDefaults() was renamed to tippy.setDefaultProps()

    This directly aligns with the React component model since every prop is dynamic and updateable. Options are now Partial, or termed "optional props". The merged interface is Props as it was before.

    • showOnInit -> showOnCreate to match lifecycle hook

    New static property

    tippy.currentInput is a mutable object with a single property isTouch. This moves the internal isUsingTouch flag to this object so that users can access it, as it's sometimes useful in rare cases.

    i.e. tippy.currentInput.isTouch

    New accessibility defaults for interactive tippys

    By default if interactive: true, then: {aria: null, appendTo: "parent"}

    There's also a warning in DEV if the tippy is not directly after the ref/triggerTarget node. If the user specifies a different appendTo, then it gets ignored as it assumes there are clipping issues and they need a custom focus management solution to handle it.

    • aria-expanded attribute also added
    • aria-describedby handles multiple tippys

    TODO

    5.1.0 goals:

    • Wrap animejs logic in an addon wrapper
    • Wrap FLIP animation library logic in an addon wrapper, hopefully solve the 2 remaining problems

    Current experimental React wrapper

    opened by atomiks 164
  • Help test out Tippy v5!

    Help test out Tippy v5!

    Hi everyone,

    The next version of Tippy.js is coming in August. In order to ensure it's as stable as possible, I need you to help test it out.

    Poll

    How are you using the tippy.js package? Answer here if you get time! #550

    Goals

    1. Improve developer experience with warnings without bloating production bundle size
    2. Massively reduce core size and make the library more treeshake-able
    3. Allow new feature additions to be added separately without increasing bundle size
    4. Improve naming consistency and usage

    Highlights

    • ⬇️ 26% smaller download size (5.8 kB minzipped including core CSS)
    • ⬇️ 46% smaller parse size (16.9 kB minified including core CSS)
    • ⬇️ 61% smaller core CSS (0.6 kB minzipped) + smaller external animation files
    • ⚙️Development and production versions for better developer experience
    • ✨New animation variations
    • ✨New touch: ["hold", delay] prop (for long press behavior)
    • ✨New arrow: string | Element values to use your own shape
    • ✨New createSingleton method, supersedes group()
    • 🌸Improved animations integration and documentation, namely fully dynamic transition dimensions when tippy content updates
    • 🌸Improved naming consistency

    Installation

    Package Managers:

    # npm
    npm i tippy.js@next
    
    # Yarn
    yarn add tippy.js@next
    

    CDN:

    <script src="https://unpkg.com/popper.js@1"></script>
    <script src="https://unpkg.com/tippy.js@next"></script>
    

    Changes

    View all of the details in the PR in progress.

    Migration Guide

    View guide

    The warnings will help a lot with this.

    Note to CDN users, it's recommended to migrate using the development file:

    <script src="https://unpkg.com/popper.js@1"></script>
    <!-- Specify development file -->
    <script src="https://unpkg.com/tippy.js@5/iife/tippy.bundle.js"></script>
    <!-- 
    When you're finished, you can remove everything after @5 
    (or when deploying for production) 
    <script src="https://unpkg.com/tippy.js@5"></script>
    -->
    

    If you were specifying a custom file path import

    import tippy from 'tippy.js'; // <— fine
    import tippy from 'tippy.js/esm/index.min.js'; // <— breaking
    

    Check the new folder structure and filenames. umd is now cjs (Node) or iife (browser).

    If you want the material filling effect back (it's no longer default)

    Node:

    import tippy from 'tippy.js';
    import 'tippy.js/backdrop.css';
    import 'tippy.js/animations/shift-away.css';
    
    tippy(targets, {
      content: 'tooltip',
      animateFill: true,
      animation: 'shift-away'
    });
    

    Browser:

    <link rel="stylesheet" href="https://unpkg.com/tippy.js@5/backdrop.css" />
    <link
      rel="stylesheet"
      href="https://unpkg.com/tippy.js@5/animations/shift-away.css"
    />
    <script src="https://unpkg.com/popper.js@1"></script>
    <script src="https://unpkg.com/tippy.js@5"></script>
    <script>
      tippy(targets, {
        content: 'tooltip',
        animateFill: true,
        animation: 'shift-away'
      });
    </script>
    

    If you were using arrowType: 'round'

    Include the svg-arrow CSS, and use the arrow prop instead.

    Node:

    import 'tippy.js/svg-arrow.css';
    
    tippy(targets, {
      arrow: 'round'
    });
    

    Browser:

    <link rel="stylesheet" href="https://unpkg.com/tippy.js@5/svg-arrow.css" />
    

    If you were using followCursor

    Enhance the tippy base function with this prop by importing it from tippy.js/extra-props.

    Node:

    import tippyBase from 'tippy.js';
    import enhance, {followCursor} from 'tippy.js/extra-props';
    
    const tippy = enhance(tippyBase, [followCursor]);
    
    tippy('button', {followCursor: true});
    

    Browser:

    <script src="https://unpkg.com/popper.js@1"></script>
    <script src="https://unpkg.com/tippy.js@5"></script>
    <script src="https://unpkg.com/tippy.js@5/extra-props/iife/tippy-extra-props.min.js"></script>
    <script>
      tippy('button', {followCursor: true});
    </script>
    

    If you were using tippy.group()

    Use createSingleton() and import from tippy.js/addons.

    Node:

    - import tippy from 'tippy.js';
    - tippy.group(tippy('button'), { delay: 1000 });
    + import { createSingleton } from 'tippy.js/addons';
    + createSingleton(tippy('button'), { delay: 1000 });
    

    Browser:

    <script src="https://unpkg.com/popper.js@1"></script>
    <script src="https://unpkg.com/tippy.js@5"></script>
    <script src="https://unpkg.com/tippy.js@5/addons/iife/tippy-addons.min.js"></script>
    <script>
      tippy.createSingleton(tippy('button'), {delay: 1000});
    </script>
    

    If you were using the target option

    Use delegate() and import from tippy.js/addons.

    Node:

    - import tippy from 'tippy.js';
    - tippy('#parent', { target: '.child });
    + import { delegate } from 'tippy.js/addons';
    + delegate('#parent', { target: '.child' });
    

    Browser:

    <script src="https://unpkg.com/popper.js@1"></script>
    <script src="https://unpkg.com/tippy.js@5"></script>
    <script src="https://unpkg.com/tippy.js@5/addons/iife/tippy-addons.min.js"></script>
    <script>
      tippy.delegate('#parent', {target: '.child'});
    </script>
    

    If you were using the showOnInit option

    It's now named showOnCreate, to match the onCreate lifecycle hook

    If you were using the size option

    It's been removed, as it's more flexible to just use a theme and specify the font-size and padding properties.

    If you were using the included themes

    • google is now material

    If you were creating custom themes

    • [x-placement] attribute is now [data-placement]
    • .tippy-roundarrow is now .tippy-svg-arrow
    • .tippy-tooltip no longer has padding on it, rather the .tippy-content selector does.
    • .tippy-tooltip no longer has text-align: center

    If you were using default animations or creating custom animations

    • shift-away, shift-toward, scale and perspective need to be imported separately now.

    Node:

    import 'tippy.js/animations/scale.css';
    

    Browser:

    <link
      rel="stylesheet"
      href="https://unpkg.com/tippy.js@5/animations/scale.css"
    />
    
    • Make sure your visible state has no translation (of 0px, instead of 10px like before).

    If you were using virtual reference elements

    Pass a placeholder element in instead of a plain object:

    tippy(document.createElement('div'));
    

    You can overwrite its getBoundingClientRect method, just like a regular object. Make sure this placeholder element does not get appended to the document though.

    If you were calling instance.set() / tippy.setDefaults() / accessing tippy.defaults

    - instance.set({});
    + instance.setProps({});
    
    - tippy.defaults;
    + tippy.defaultProps;
    
    - tippy.setDefaults({});
    + tippy.setDefaultProps({});
    

    Types

    • Props is not Partial anymore, it's Required
    • Options removed (use Partial<Props>)
    • BasicPlacement renamed to BasePlacement
    ✋ help wanted 
    opened by atomiks 37
  • Add ability to use event delegation

    Add ability to use event delegation

    @Prnda1976

    Can you check this out and play with it to see if it's all good?

    It wasn't as hard as I thought. The mouseenter focus gets switched to mouseover focusin (for bubbling). The popper instance gets re-used so performance is increased. One slight thing I noticed is that because it's re-used, there can't be two tooltips on the page so it will instantly "hide"/transition out if the cursor went to the next target. Not that big of a deal though...


    EDIT: To use dynamic titles:

    <div id="parent" title="_">
      <div class="child" data-title="one">text</div>
      <div class="child" data-title="two">text</div>
      <div class="child" data-title="three">text</div>
      <div class="child" data-title="four">text</div>
    </div>
    
    tippy('#parent', {
      target: '.child',
      onShow() {
        const content = this.querySelector('.tippy-content')
        content.innerHTML = this._reference.getAttribute('data-title')
      }
    })
    
    opened by atomiks 28
  • accessibility changes

    accessibility changes

    My employer has recently hired very talented consultants to evaluate how accessible our software is. They've also evaluated tippy since it's part of that product. Mostly the review came back pretty clean, but they flagged a few issues related to some aria-* property declarations.

    Would this feedback be something you'd be interested in? I'm happy to forward the tippy specific stuff if you'd find that useful.

    opened by mreinstein 24
  • feat: add transparent ::after element, refactor styles

    feat: add transparent ::after element, refactor styles

    I was able to solve #726 and #720 without (or very unlikely) breaking changes!

    Compatibility: Styles should remain the same due to:

    • ::before element now inherits from text color of arrow, but it was probably never changed by users. (No usage)
    • added ::after element which is transparent as long as border-color of arrow element is not changed, which is also unlikely to be changed by users, since it had no effect on the styles
    • even if these changes were made, themes have priority through stronger CSS selectors

    There is a probability of a break in custom themes (i.e if someone made similar changes I did), but I really doubt it.

    Feature: basic styles + added user CSS:

    .tippy-box {
      border: darkcyan solid 1px;
      background-color: lightblue;
    }
    .tippy-arrow {
      border-color: darkcyan;
      color: lightblue;
    }
    

    You have following effect image

    Without border:

    .tippy-box {
      background-color: lightblue;
    }
    .tippy-arrow {
      color: lightblue;
    }
    

    image

    Btw. This feature highly improves #725 plugin because it is no longer necessary to create style tag.

    opened by woothu 23
  • V4 (WIP)

    V4 (WIP)

    Core

    • Rename performance option to ignoreAttributes
    • Remove arrowTransform option
    • Remove tippy.useCapture() & tippy.disableAnimations()
    • Remove tippy.one() and collections, return the instance directly if Element or VirtualElement, otherwise array of the instances
    • tippy.hideAllPoppers() renamed to tippy.hideAll() and ignores hideOnClick value for static method consumers
    • CSS simplified, opinionated CSS like font-smoothing removed
    • tippy.group() method
    • In event delegation mode, content and appendTo as functions receive the target element rather than the delegate reference
    • updateDuration: 0 by default so flips don't have the weird transition, and specifying any number uses true smooth flips (with no problem on IE11 now)
    • MutationObserver removed, .set() calls scheduleUpdate() now, and if changing a HTML element as the content, the user should manually call .scheduleUpdate() or use a ResizeObserver polyfill for complete update accuracy
    • Flipping has changed. livePlacement was renamed to flipScroll and now position does still update on scroll, but it doesn't flip while scrolling. Flipping while scrolling is now disabled by default since it's better UX, I think.
    • Remove all focus handling: leave it up to the developer. Recommended option requires no focus handling: append it directly after the trigger so elements can be tabbed to. There may be some stacking issues where it needs to be appended to the body, but they can programmatically .focus() it if need be and make it act like a modal.

    Package

    • Babel 7
    • popper.js is external in all files and formats
    • 4 formats: -- index.js = tippy -- index.min.js = tippy minified -- index.all.js = tippy + css -- index.all.min.js = tippy + css minified
    • Files are no longer nested under dist and exist in the root directory, aka
    tippy.js/
    ├── umd/
    │   ├── index.js
    │   ├── ...
    ├── esm/
    │   ├── index.js
    │   ├── ...
    ├── themes/
    │   ├── light.css
    │   ├── ...
    ├── index.css
    ├── index.d.ts
    ├── LICENSE
    ├── README.md
    ├── package.json
    

    I think we should default to the injectCSS method for modules as well, no need to import CSS manually - thoughts?:

    {
      "main": "./umd/index.all.min.js",
      "module": "./esm/index.all.js"
    }
    

    Use minified code for "main" field (since sourcemaps anyway?), so CDN include looks like this:

    <script src="https://unpkg.com/popper.js@1/dist/umd/popper.min.js"></script>
    <script src="https://unpkg.com/tippy.js@4"></script>
    

    Examples:

    // A: Uses esm format + injects CSS
    import tippy from 'tippy.js'
    
    // B: Uses cjs format + import css
    const tippy = require('tippy.js/umd/index.js')
    require('tippy.js/index.css')
    

    Minzipped bundle sizes look like:

    JS: 5.93 kB CSS: 1.56 kB

    /cc @KubaJastrz

    opened by atomiks 23
  • V2 API / Wishlist 🎈

    V2 API / Wishlist 🎈

    Let me know what kind changes you would like to see.

    V1 didn't have any input from people so I'd like to prepare a bit better, such as the improving the naming of things, use cases, etc.

    To align more with Popper.js I'm thinking:

    JS:

    • data objects for each tooltip should rename the el property (the element given the tooltip) to reference (like Popper does)
    • getReferenceData() should just be getData()? (I had trouble trying to decide what it should be before)
    • Rename settings to options throughout (this seems to be more standard from what I've seen)
    • Get rid of src from package, add ESM/UMD files
    • Naming convention cleanup. I think going all lowercase makes things simple. tippy.Browser.SUPPORTED / tippy.Defaults should probably just be tippy.browser.supported and tippy.defaults?

    CSS:

    • Switch from enter / leave "global" classes to data attributes, like data-state="show" / data-state="hide"? Or x-state?
    • Rename arrow classes (.arrow-big etc) and use large in favor of big
    • Animation/Theme plugins for more options?
    • Also how about injecting CSS to the document straight from the JS to simplify it even further? Not sure if this is bad practice though.
    ✋ help wanted 
    opened by atomiks 23
  • Lots of tooltip with infinite scroll

    Lots of tooltip with infinite scroll

    Hi,

    My website is a song database. Each songs have 3 types of opinion (up / like / down). With that system, our DJs can give their opinions. When a use click give it's opinion, i update the title. The website uses turbolinks to ensure a continued audio play. So my tippy instance is not destroyed during navigation.

    My problem are:

    • auto update of title (but they are already a bug on that)
    • append to an existing Tippy instance, the new songs added by the infinite scroll. I can destroy but not add a tooltip to an existing instance.

    I would like to do : tip.add("CSS selector")

    Is there a good way of doing that ?

    thanks

    opened by obsidienne 22
  • Linting

    Linting

    • Linting (ESLint): Add .eslintignore (Useful for IDE to avoid flagging when browsing files)
    • Linting (ESLint): Apply ESLint to rollup.build.js
    • Linting (ESLint): Fix error of missing done in test file (though test is in the ignore file to avoid flagging lesser errors)
    • Linting (npm): Add linter-recommended contributors, bugs, homepage, and engines properties (some of these used on npmjs.com)
    • Linting (HTML): Avoid favicon request in console

    As far as the test linting errors, I personally think it would be better to ensure you are catching any errors there (if not in website too), but as it didn't appear to be your intent to lint them, I've added test and website to .eslintignore as well as the dist paths.

    See above for the other rationales of inclusion.

    I plan to provide a more substantive PR for modules after this.

    opened by brettz9 21
  • Strange behaviour inside scrollable container when body is scrolled

    Strange behaviour inside scrollable container when body is scrolled

    Hi, I decided to use your lib and had found some strange behaviour when target element is inside block with scrollable overflow and body is scrolled too.

    Here is screenshot http://prntscr.com/f0ks7j.

    How to reproduce:

    1. Goto https://jsbin.com/cuvagihudu/edit?html,css,js,output
    2. Scroll body to the end.
    3. Scroll .container to the end
    4. Hover "Hover me, i'm broken!" button and check the position of the tooltip.

    Looks like this case doesn't take into account the body's or document's scrollOffset

    opened by v3il 20
  • Adding tooltip to dynamically generated elements

    Adding tooltip to dynamically generated elements

    I'm having a tooltip template which I add to some elements in the document ready event. Is it possible to add that tooltip to dynamically created elements that are generated afterwards?

    opened by mikekok 20
  • Arrow of tippy is ending sharply when adding border through broder.css

    Arrow of tippy is ending sharply when adding border through broder.css

    Bug description

    Tippy provides a way to add border around the popout through border.css. When added in the above suggested way the arrows are not ending with the container level, the arrow ending are extended into the container.

    image

    This issue is more noticeable when the tippy is shown on the right or bottom of the reference element.

    Reproduction

    CodePen link: https://codepen.io/Monisha98/pen/eYjJZza Click on the button to open the tippy in general it could be seen the arrows are not ending evenly. If not the issue can be reproducible through zoom.

    🐛 bug 🚧 unconfirmed 
    opened by monishanalluru 0
  • Input on change event is not working inside tippy content

    Input on change event is not working inside tippy content

    I have an input inside tippy content but the on-change is not firing

    <input (ngModelChange)="onSearchQueryChange($event)" />

    CodePen link: https://codepen.io/atomiks/pen/yvwQyZ

    🐛 bug 🚧 unconfirmed 
    opened by keyone-zen 0
  • docs: add disabling animations section

    docs: add disabling animations section

    Add a "disabling animations" section to the animations page, so that it's more easier for the new users to find this option.

    Let me know if there's anything else I need to do on this PR 😉

    opened by Smankusors 0
  • Update plugins to use the correct key code

    Update plugins to use the correct key code

    In the documentation for plugins you recommend to useKeyboardEvent.keyCode however this is deprecated, the current advice is to use KeyboardEvent.code. So I have updated the docs to reflect this very minor change.

    opened by dankentfield 0
  • Use with Nuxt3

    Use with Nuxt3

    Problem

    Tip delegation doesn't do anything with an SSR app using Nuxt3, even with elements available at load time and dynamic elements.

    <div id="tippyRoot">
    <App/>
    </div
    
    <a
         data-tippy-content="Learn More About Schema.org"
         href="https://schema.org/"
         target="_blank"
         >Schema.org</a>
    
    delegate("#tippyRoot", {
            target: "[data-tippy-content]",
            content: 'loading',
            animation: "scale",
            trigger:'hover',
            onShown(instance) {
              instance.setContent(instance.reference.dataset.tippyContent);
            },
     });
    

    All elements have the appropriate data attribute but nothing seems to work.

    Solution

    Seems like delegate would do the job but something is off. even setting a timeout before initializing doesn't work to make sure everything is loaded. Any suggestions or documentation on how to use this library with Nuxt3? Love the library but after we switched to SSR I'm having a ton of issues getting it to work.

    💎 enhancement 
    opened by marcodarko 1
Releases(v6.3.7)
  • v6.3.7(Nov 10, 2021)

    Fixes

    • fix: toggle repeated clicks with inner target element (#1002)
    • fix: change mounted state after true mount (#1003)
    • fix: check state only from hide (#1004)
    • fix(delegate): warnings in console with esm (#1006)
    Source code(tar.gz)
    Source code(zip)
  • v6.3.5(Nov 5, 2021)

  • v6.3.4(Nov 4, 2021)

    Fixes

    • (delegate): touch input with click trigger & hideOnClick
    • [Firefox] clicking into a <select> inside an interactive tippy will not cause it to hide with mouseenter trigger
    Source code(tar.gz)
    Source code(zip)
  • v6.3.3(Oct 29, 2021)

    Fixes

    • ensure singleton cleans up previous instances when updated (#993)
    • (inlinePositioning): infinite loop (#994)
    • undefined props stripped in setProps
    Source code(tar.gz)
    Source code(zip)
  • v6.3.2(Oct 1, 2021)

    Fixes

    • wrong target (#914)
    • interactive option for shadow dom (#913)
    • contains algorithm for shadow dom (#915)
    • hovering a hiding content leads to incorrect position (#883)
    • reset white-space to its initial value (#969)
    • defaultProps issues
    • remove userAgent usage
    Source code(tar.gz)
    Source code(zip)
  • v6.3.1(Feb 26, 2021)

  • v6.3.0(Feb 23, 2021)

    Features

    • Add methods to singletons to control them programmatically
    • Upgrade Popper dependency base to 2.8.3 from 2.4.4

    Fixes

    • Passive event listener warning
    • Call popperInstance before mount
    • followCursor issue with getOwnerDocument
    Source code(tar.gz)
    Source code(zip)
  • v6.2.7(Oct 10, 2020)

    Fixes

    • use parentNode's ownerDocument
    • (delegate): handle disabled state
    • (createSingleton): do not override getReferenceClientRect
    • (createSingleton): intercept setProps calls of individual instances
    Source code(tar.gz)
    Source code(zip)
  • v6.2.6(Jul 29, 2020)

    Fixes

    • use getCurrentTarget() in interactivity hide listener
    • move var assignment into hide() method
    • (followCursor): wrong position if mouse was not moved initially
    • (delegate): missing comparison check
    Source code(tar.gz)
    Source code(zip)
  • v6.2.5(Jul 9, 2020)

  • v6.2.4(Jul 3, 2020)

    Fixes

    • fix(followCursor): global mouse listener
    • fix(followCursor): touch behavior
    • fix: resolve undefined props to the default value
    • fix: remove body interactive mouseleave listener
    Source code(tar.gz)
    Source code(zip)
  • v6.2.2(Apr 27, 2020)

    Fixes

    • (inlinePositioning): increased 1px buffer to 2px (https://github.com/atomiks/tippyjs/issues/763#issuecomment-619780385) and fallback to standard technique instead of boundingRect
    Source code(tar.gz)
    Source code(zip)
  • v6.2.1(Apr 27, 2020)

    Fixes

    • set text-align: initial for svg-arrow
    • improve touch click outside
    • popperOptions modifier push order
    • (types): allow DocumentFragment from Content function
    • (inlinePositioning): use cursor rect for disjoined rects
    Source code(tar.gz)
    Source code(zip)
  • v6.2.0(Apr 17, 2020)

    Features

    • createSingleton can have overrides prop and tippyInstances updated
    • hideWithInteractivity method
    • Allow contextElement property on getReferenceClientRect

    Fixes

    • Correct "click focus" trigger behavior
    • onClickOutside lifecycle is called in plugins
    • allowHTML updates if content does not update via .setProps()
    • Types fixes
    Source code(tar.gz)
    Source code(zip)
  • v6.1.1(Apr 3, 2020)

    Fixes

    • handle document fragments
    • only emit console messages once per unique
    • add contextElement property to virtual element
    • (delegate): handle touch prop
    • (types): use unknown as generic for Props.plugins
    Source code(tar.gz)
    Source code(zip)
  • v6.1.0(Mar 16, 2020)

  • v6.0.2(Mar 11, 2020)

    Fixes

    • Fix nested tippy position updates when the nested ones are re-rendered first (e.g. in React)
    • Ensure instance is hidden before unmounting if calling .unmount() without a .hide() call before it
    • Handle zIndex on popper node internally
    • Set transition duration to 0 before mount
    • (animateFill): check if value is truthy for render fn error
    • (hideAll): add isDestroyed guard
    Source code(tar.gz)
    Source code(zip)
  • v6.0.1(Mar 5, 2020)

    Fixes

    • Circular call loop if calling .destroy() in onHidden() (#724)
    • createSingleton() when using function content (#723)
    • Mispositioned arrow by 1px (@popperjs/core upgrade)
    • Mispositioned arrow if tippy is inside a text-align: center container
    • Set animation: false for headless UMD build
    • Only set popper.style.visibility if the default render function is specified
    Source code(tar.gz)
    Source code(zip)
  • v5.2.1(Feb 12, 2020)

    Fixes

    • hide tippy on focusout from child element (#694)
    • improve hiding upon scroll with interactivity
    • followCursor: scroll listeners for vertical/horizontal
    Source code(tar.gz)
    Source code(zip)
  • v5.2.0(Jan 31, 2020)

    Features

    • Add support for 'focusin' trigger (#689)

    Fixes

    • Prevent removing aria-expanded attribute if already present on the reference (#690)
    Source code(tar.gz)
    Source code(zip)
  • v5.1.4(Jan 13, 2020)

  • v5.1.3(Dec 29, 2019)

    Fixes

    • modify trigger: 'mouseenter click' behavior (#659)
    • createSingleton: add bail-out check
    • followCursor: preserve original popperInstance.reference
    • sticky: popperInstance reference should be checked
    • errors/warnings: fix dev/prod divergence and change formatting to prevent odd text wrapping
    Source code(tar.gz)
    Source code(zip)
  • v5.1.2(Nov 26, 2019)

    Fixes

    • core: preserve previous popperInstance.reference on setProps
    • core: showOnCreate prop should respect delay
    • types: export Boundary as a type (#637)
    Source code(tar.gz)
    Source code(zip)
  • v5.1.1(Nov 3, 2019)

    Fixes

    • core: filter out duplicate plugins (#626)
    • core: revert distance technique to use top/left properties (#628)
    • inlinePositioning: works with .show() method (#630)
    • types: refactor interfaces to generics, strict types for custom plugins, function overloading types for tippy and delegate
    Source code(tar.gz)
    Source code(zip)
  • v5.1.0(Oct 22, 2019)

    Features

    • Allow plugins passed as Props.plugins

    Deprecations

    • Deprecate createTippyWithPlugins() - use tippy.setDefaultProps({plugins: [...]});
    Source code(tar.gz)
    Source code(zip)
  • v5.0.4(Oct 21, 2019)

    Fixes

    • core: Fix onWindowBlur condition
    • core: Fix iife versions' addons not having plugins passed by default
    • followCursor: Allow .show() / .hide() to work
    • types: Handle null in delay/duration arrays
    Source code(tar.gz)
    Source code(zip)
  • v5.0.3(Oct 14, 2019)

    Fixes

    • core: Reduce impact of .tippy-iOS class side effects
    • core: Improve support for nested tippies (CSS fixes + account for nested interactiveBorders)
    • core: hideAll() works on <iframe>s
    • props: distance should accept strings
    • css: Switch to consistent px units
    • warnings: Tweak invalid prop warning
    • warnings: Tweak arrowType warning
    • warnings: Fix target warning link
    Source code(tar.gz)
    Source code(zip)
  • v5.0.2(Oct 6, 2019)

    Fixes

    • core: Only set transition duration to 0 upon show if not currently mounted (for createSingleton early cancelation)
    • core: Plugin hooks for onShow and onHide invoked before props'
    • core: Change distance technique to use padding on popper instead of top/left on tooltip
    • css: Improve consistency of vars and units
    • addons: Add support for plugins
    • delegate: Account for data-tippy-trigger attribute
    • createSingleton: Fix missing argument in onAfterUpdate to preserveInvocation()
    • perf: Optimize data-tippy-* attribute reducer
    • warnings: Add link to accessibility docs for interactive warning and improve clarity
    Source code(tar.gz)
    Source code(zip)
  • v5.0.1(Oct 1, 2019)

    Fixes

    • core: Add support for iframes: https://github.com/atomiks/tippy.js-react/issues/121
    • core: Use .currentTarget over .target
    • core: Clear pending timeouts on destroy
    • followCursor: Use rAF instead of setTimeout to avoid rare jitter on content update
    • followCursor: reset popperInstance reference onHidden
    • warnings: Ensure links end with trailing slash
    • types: Add missing type for createTippyWithPlugins
    Source code(tar.gz)
    Source code(zip)
jQuery plugin to fire events when user's cursor aims at particular dropdown menu items. For making responsive mega dropdowns like Amazon's.

jQuery-menu-aim menu-aim is a jQuery plugin for dropdown menus that can differentiate between a user trying hover over a dropdown item vs trying to na

Ben Kamens 7.7k Dec 30, 2022
:zap: A sliding swipe menu that works with touchSwipe library.

Slide and swipe menu A sliding menu that works with touchSwipe library. Online demo Visit plugin site. Appszoom also uses it! So cool! What's the diff

Joan Claret 138 Sep 27, 2022
A jQuery plugin that creates a paneled-style menu (like the type seen in the mobile versions of Facebook and Google, as well as in many native iPhone applications).

#jPanelMenu ###Version 1.4.1 jPanelMenu is a jQuery plugin for easily creating and managing off-canvas content. Check out the demo (and documentation)

Anthony Colangelo 927 Dec 14, 2022
Quick access menu for the GNOME panel with options that help ease the workflow for newcomers and power users alike.

Tofu Menu (formerly Fedora Menu) Quick access menu for the GNOME panel with options that help ease the workflow for newcomers and power users alike. S

null 19 Sep 26, 2022
A touch slideout navigation menu for your mobile web apps.

Slideout.js A touch slideout navigation menu for your mobile web apps. Features Dependency-free. Simple markup. Native scrolling. Easy customization.

Mango 8k Jan 3, 2023
An experimental inline-to-menu-link animation based on a concept by Matthew Hall.

Inline to Menu Link Animation An experimental inline-to-menu-link animation based on a concept by Matthew Hall. Article on Codrops Demo Installation I

Codrops 35 Dec 12, 2022
The best javascript plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp.

mmenu.js The best javascript plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp. It is very customiz

Fred Heusschen 2.6k Dec 27, 2022
The best javascript plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp.

mmenu.js The best javascript plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp. It is very customiz

Fred Heusschen 2.6k Dec 27, 2022
Slidebars is a jQuery Framework for Off-Canvas Menus and Sidebars into your website or web app.

Slidebars Slidebars is a jQuery Framework for Off-Canvas Menus and Sidebars into your website or web app. Version 2.0 is a complete rewrite which feat

Adam Smith 1.5k Jan 2, 2023
Sidebar-skeleton - Simple and fast sidebar skeleton on Bootstrap

Compostrap Simple and fast components build on Bootstrap Sidebar skeleton Simple and fast sidebar skeleton. Installation npm install --save sidebar-sk

Compostrap 4 May 6, 2022
discord selected menu , discord selection menu , discord selec menu , discord select menu

Selected menu ihtiyacı olan arkadaşlar için paylaştım. Kodlar bana ait değildir githubdan bulduğum bir yerden alıp düzenledim. İşinize yarar örnek ekr

Wapper. 4 Jan 24, 2022
VanillaSelectBox - A dropdown menu with lots of features that takes a select tag and transforms it into a single or multi-select menu with 1 or 2 levels

vanillaSelectBox v1.0.0 vanillaSelectBox : v1.00 : Adding a package.json file New : Possibility to change the dropdown tree and change the remote sear

philippe MEYER 103 Dec 16, 2022
A library that helps you write a static dropdown menu that follows the digital accessibility recommendations.

JSPanel A library that helps you write a static dropdown menu, a panel, that follows the digital accessibility recommendations. Get started First of a

CodoPixel 1 Apr 29, 2021
A Vue.js popover component based on PopperJS

vue3-popper A popover component for Vue 3 Documentation Check out the documentation Getting started Usage Install NPM npm install vue3-popper Yarn yar

Valgeir Björnsson 170 Dec 30, 2022
Pure JavaScript (VanillaJS) dropdown menu, with multiple select and searching support

JS Select Pure JavaScript (VanillaJS) dropdown menu, with multiple select and searching support How to use To use the select plugins, two main file mu

Luigi Verolla 4 Mar 17, 2022
jQuery plugin to fire events when user's cursor aims at particular dropdown menu items. For making responsive mega dropdowns like Amazon's.

jQuery-menu-aim menu-aim is a jQuery plugin for dropdown menus that can differentiate between a user trying hover over a dropdown item vs trying to na

Ben Kamens 7.7k Dec 30, 2022
Responsive Dropdown Menu Bar

Responsive Dropdown Menu Watch it on youtube Responsive Dropdown Menu Beautiful and clean responsive navigation bar includes a beautiful drop-down sid

Marlon 44 Oct 21, 2022
This restaurant project is a SPA (single-page application) website. The user can navigate between the home, menu and contact page. I used the MealDB API to display some menu items.

Fresh Cuisine This restaurant project is from the Odin Project and it is a SPA (single-page application) website. The user can navigate between the ho

Virag Kormoczy 7 Nov 2, 2022
jSide Menu is a well designed, simple and clean side navigation menu with dropdowns.

jQuery jSide Menu jSide Menu is a well designed, simple and clean side navigation menu with dropdowns. Browse: Live Demo & Using Guide Main Features F

CodeHim 24 Feb 14, 2022
Obsidian-dataview-table-filter-menu - Dynamically created filter menu for dataview tables in obsidian

Dataview table Filter Menu for Obsidian Dynamically created filter menu for data

shiro 17 Sep 24, 2022