tippyjs

Tooltip, popover, dropdown, and menu library

MIT License

Downloads
8.9M
Stars
11.6K
Committers
36

Bot releases are visible (Hide)

tippyjs - 1.4.0

Published by atomiks about 7 years ago

  • Added ability to pass a custom virtual object instead of a DOM node to act as the positioning reference
  • Now catches/silences errors if invalid input argument is passed to tippy constructor
tippyjs - 1.3.0

Published by atomiks about 7 years ago

  • Improve dynamicTitle option by using a mutation observer instead - #107

  • Add option to set html as a function which returns an Element

  • Add option to use a NodeList in constructor

  • Fix error when in a non-browser environment

tippyjs - v1.2.2

Published by atomiks about 7 years ago

tippyjs - v1.2.1

Published by atomiks about 7 years ago

Popper.js version updated to 1.12.4

NOTE: There is an issue in Popper 1.12.5 (latest) that affects Tippy too much to use. However it fixed an issue related to fixed containers

Fixes

  • appendTo by default is now a function which returns document.body when called (done upon initial tooltip creation), see https://github.com/atomiks/tippyjs/pull/95 - particularly useful for Turbolinks when the body element has been changed. This means you can also make appendTo a function which returns an Element.

  • Transitions are less glitchy when quickly showing/hiding tooltips

  • Tooltips are destroyed upon show if their reference element no longer exists on the DOM

tippyjs - v1.2.0

Published by atomiks about 7 years ago

  • Popper.js version updated to 1.11.1

Features

  • dynamicTitle option (#74)
  • Allow an array of elements to be passed in constructor

Fixes

  • pointer-events: none added to parent popper element instead of tooltip element - fixes issue (most noticeable in Firefox) with followCursor causing the tooltip to hide when the cursor landed on top of it
  • use 20ms time difference instead of 10 for mousemove handler (dynamic input detection) now that Chrome 60 fires 1 per anim frame
tippyjs - v1.1.3

Published by atomiks over 7 years ago

  • [js] followCursor now respects the offset setting and is more closely positioned to the cursor
  • [css] Filling animation improved & arrow margins are 9px for top/bottom and 6px for left/right positions

[fix] #73 - Issue with standalone bundling that was in 1.1.1

tippyjs - v1.1.0

Published by atomiks over 7 years ago

Fixes

  • fix #72 - blur handler is now bound to the window and will blur tooltipped elements when user leaves the window or tab
  • fix #69 - arrows now have 5px margins

Features

  • Tooltips now update their position automatically if their content changes (requires window.MutationObserver, so no IE10 support unless polyfilled)

Deprecations

  • Callback functions without on prefix are deprecated, prefer onShown, onHidden, etc over shown and hidden - as it better indicates a callback function
tippyjs - v1.0.1

Published by atomiks over 7 years ago

Popper.js 1.10.2 => 1.10.6

  • fix #65 - only interactive tooltips get a tabindex attribute and it's set to -1 instead of 0
  • fix potential iOS problem with mouseenter when the element was not a HTMLElement (like SVG)
  • optimize destroyAll() to make it quicker
  • add leading hash (#) to DOM elements in the html setting (its data-template-id) so it's consistent with the selector string
  • differentiate between instance store and global Store (each instance now has a store property holding all the data objects)
  • animateFill made nicer - the content fades out a bit quicker to prevent the text from obviously overflowing (when the background isn't white like the text)
  • The popper element uses an easeOutQuart timing function for better transitioning between flips/position updates
  • Trying to use update() on a DOM element now throws a warning and aborts as it causes unwanted behavior/data loss
tippyjs - v1.0.0

Published by atomiks over 7 years ago

Breaking changes, features and fixes in v1.0.0

Lots of tests have been written (more to be written over time) and code refactored into individual units. API has been simplified.

Core

  • Popper.js 1.9.9 => 1.10.2
  • The module is now lowercase tippy instead of Tippy as it’s just a factory function not a constructor.
  • Access the browser settings set internally by accessing tippy.Browser.
  • tippy.defaultSettings => tippy.Defaults
  • New dynamic input detection enabled for more reliable settings. Notable settings where this is important is blur listener, followCursor setting and hideOnClick setting.

Settings

  • duration and delay can now be either a number or an array for [show, hide].
  • hideDelay and hideDuration removed.
  • New performance setting added. Disables data-* attribute settings for faster instantiation (around 2x faster).
  • theme can now have multiple themes, separate each theme by a space such as theme: 'main light'

Methods

  • getTooltippedElement is now getReferenceElement
  • getReference is now getReferenceData. It also prefixes private properties with an underscore which are for internal/private use.
  • New destroyAll method added. Destroys all tooltips created by the instance.

Callbacks

  • beforeHidden is now hide
  • beforeShown is now show
  • The five are: show, shown, hide, hidden, wait.

Fixes

  • Interactive tooltips will now close if the cursor leaves the document and there was no gap between the element, popper and browser window
  • Interactive tooltips with delay won't show on first hover if mouseleave was fired before delay finished (#62)
  • Enable event listeners for followCursor on touch devices since it doesn’t apply to them.
  • closest() changed to a ponyfill instead of a polyfill.
  • pointer-events: none added on non-interactive tooltips to prevent cursor from changing and to stop
    hide events from firing when using animation: shift + arrow: true when the cursor lands on the arrow.
  • Slightly improved animations
  • Simplified simulated click on iOS. External anchor links (i.e. with target="_blank") will require a double-tap, but internal links will load on first tap.
  • duration: 0 now makes callbacks synchronous
  • outline: 0 added to the popper element
  • Pointless/unused CSS removed