# Table of Contents - [Tippy.js - Tooltip and Popover Library](#tippy-js-tooltip-and-popover-library) - [Getting Started | Tippy.js](#getting-started-tippy-js) - [Creating Tooltips | Tippy.js](#creating-tooltips-tippy-js) - [Customizing Tooltips | Tippy.js](#customizing-tooltips-tippy-js) - [Themes | Tippy.js](#themes-tippy-js) - [Tippy Instance | Tippy.js](#tippy-instance-tippy-js) - [HTML Content | Tippy.js](#html-content-tippy-js) - [All Props | Tippy.js](#all-props-tippy-js) - [Lifecycle Hooks | Tippy.js](#lifecycle-hooks-tippy-js) - [Animations | Tippy.js](#animations-tippy-js) - [Addons | Tippy.js](#addons-tippy-js) - [AJAX | Tippy.js](#ajax-tippy-js) - [Methods | Tippy.js](#methods-tippy-js) - [Accessibility | Tippy.js](#accessibility-tippy-js) - [Misc | Tippy.js](#misc-tippy-js) - [Motivation | Tippy.js](#motivation-tippy-js) - [Plugins | Tippy.js](#plugins-tippy-js) - [FAQ | Tippy.js](#faq-tippy-js) --- # Tippy.js - Tooltip and Popover Library [Skip to content](https://tippyjs.bootcss.com/#reach-skip-nav) Demo ---- Tippy.js is a highly customizable tooltip and popover library powered by [Popper.js](https://popper.js.org/) . * 🧠 **Smart:** optimized positioning engine for flipping and overflow prevention * ⚡ **Fast:** high performance for low-end devices * 🖱️ **Universal:** works with mouse, keyboard, and touch inputs * ♿ **Accessible:** WAI-ARIA compatible * 🖌 **Themeable:** style via custom CSS, includes extra themes and animations * 🔌 **Pluggable:** enhance functionality with plugins * 🌳 **Tree-shakable:** minimize bundle size by importing what you need * 🧩 **Typed:** TypeScript support out of the box * 🌐 **Supports IE11+:** compatible with 99% of desktop and 97% of mobile users Ready to start? Visit [Getting Started](https://tippyjs.bootcss.com/getting-started/) , or view a demo of Tippy's features below. * * * ### [#](https://tippyjs.bootcss.com/#default) Default The default tippy tooltip looks like this: My Button It has a background color of `#333` and an arrow pointing toward the element, and is triggered by either `mouseenter` or `focus` events so it appears when hovered, focused via keyboard navigation, or tapped when using a touch device. With a button element on the document like this: You can initialize it like so: tippy('#myButton', { content: "I'm a Tippy tooltip!" }); * * * ### [#](https://tippyjs.bootcss.com/#placement) Placement Tooltips can be placed in four base ways in relation to the reference element. Additionally, the tooltip can be shifted along the axis using the suffix `-start` or `-end`. top top-start top-end right right-start right-end bottom bottom-start bottom-end left left-start left-end If a tippy cannot fit within its desired placement, it will flip to the opposite placement if there is not enough space. In the above examples, flipping has been disabled to demonstrate each placement properly. * * * ### [#](https://tippyjs.bootcss.com/#arrows) Arrows The arrow that points toward the element can have its proportion or shape modified, or be disabled completely. DefaultRoundLargeSmallWideNarrow * * * ### [#](https://tippyjs.bootcss.com/#animations) Animations Tooltips can have different types of transition animations. By default, it's a simple `fade` (opacity transition). #### [#](https://tippyjs.bootcss.com/#extra-included-animations) Extra included animations These animations are included in the package and can be imported separately. shift-away shift-away-subtle shift-away-extreme shift-toward shift-toward-subtle shift-toward-extreme scale scale-subtle scale-extreme perspective perspective-subtle perspective-extreme #### [#](https://tippyjs.bootcss.com/#material-filling-effect-1) Material filling effect Text #### [#](https://tippyjs.bootcss.com/#inertia-/-slingshot-elastic-effect) Inertia / slingshot elastic effect Add CSS spring physics to the animation using `transition-timing-function`. scalescale-subtlescale-extreme #### [#](https://tippyjs.bootcss.com/#css-keyframe-animations) CSS keyframe animations Getting more advanced, you can use actual CSS animations (`@keyframes` rules), for example using the `animate.css` package: rubberBandtada #### [#](https://tippyjs.bootcss.com/#duration) Duration 01000\[0, 500\]\[500, 0\] * * * ### [#](https://tippyjs.bootcss.com/#themes) Themes Tooltips can have custom styling. #### [#](https://tippyjs.bootcss.com/#included-themes) Included themes These themes are included in the package and can be imported separately. lightlight-bordermaterialtranslucent #### [#](https://tippyjs.bootcss.com/#custom-themes) Custom themes You can apply any CSS to a tippy via a theme. gradientretroforest * * * ### [#](https://tippyjs.bootcss.com/#triggers) Triggers Tooltips can also be triggered by `click` or `focus` events. ClickFocus * * * ### [#](https://tippyjs.bootcss.com/#interactivity-1) Interactivity Tooltips can be interactive, allowing you to hover over and click inside them. Interactive * * * ### [#](https://tippyjs.bootcss.com/#html-content) HTML Content Tooltips can contain HTML. HTML ContentDropdown * * * ### [#](https://tippyjs.bootcss.com/#delay) Delay Tooltips can delay hiding or showing after a trigger. 500\[800, 0\]\[0, 800\] * * * ### [#](https://tippyjs.bootcss.com/#follow-cursor) Follow Cursor Tooltips can follow the mouse cursor and abide by a certain axis. Additionally, the tooltip can follow the cursor until it shows, at which point it will stop following (initial). DefaultHorizontalVerticalInitial * * * ### [#](https://tippyjs.bootcss.com/#svgs) SVGs Tooltips can be placed on SVG nodes, where `followCursor: 'initial'` becomes very useful, since it can be placed directly on the line. * * * ### [#](https://tippyjs.bootcss.com/#singleton-1) Singleton Use a single tooltip for many different reference elements. This allows you to "group" tooltips with a shared timer to improve UX when elements near each other have tooltips with a `delay` prop. Non-singleton tippy with `delay: 500`: TextTextTextText Singleton tippy to group each tippy's `delay: 500`: TextTextTextText Singleton tippy with a transition: TextTextTextText * * * ### [#](https://tippyjs.bootcss.com/#nesting) Nesting A tippy can be nested within another one. Level 0 This allows you to create a hover menu system. * * * ### [#](https://tippyjs.bootcss.com/#multiple) Multiple Attach many tippies to a single element. Hover me * * * ### [#](https://tippyjs.bootcss.com/#miscellaneous) Miscellaneous OffsetDistanceMax width The above is not a complete list of features. There are plenty more! [Getting Started](https://tippyjs.bootcss.com/getting-started/) --- # Getting Started | Tippy.js [Skip to content](https://tippyjs.bootcss.com/getting-started/#reach-skip-nav) Getting Started --------------- There are two ways to install the package. ### [#](https://tippyjs.bootcss.com/getting-started/#1-package-manager) 1\. Package Manager # npm npm i tippy.js # Yarn yarn add tippy.js In your application, import the `tippy` module, and the core CSS: import tippy from 'tippy.js'; import 'tippy.js/dist/tippy.css'; This assumes you're using a module bundler like webpack, Rollup, or Parcel. If you're getting an error message about `process` inside the browser, [see the FAQ for help.](https://tippyjs.bootcss.com/faq/#im-getting-uncaught-referenceerror-process-is-not-defined) ### [#](https://tippyjs.bootcss.com/getting-started/#2-cdn) 2\. CDN Place them at the very bottom of the ``, ensuring they are placed before your own scripts. The version numbers after `@` are important, make sure they don't get removed. #### [#](https://tippyjs.bootcss.com/getting-started/#development-version) Development version While developing, it's recommended to use the development file which includes helpful warnings and error messages when something goes wrong: When you're finished developing (or deploying for production), you can remove everything after `@5` (the production file as listed before). ### [#](https://tippyjs.bootcss.com/getting-started/#node-vs-browser) Node vs. Browser This documentation defaults to module imports in all examples, so be aware that the following import path using a module bundler in Node: import 'tippy.js/dist/backdrop.css'; Is equivalent to this using a CDN in the browser: ### [#](https://tippyjs.bootcss.com/getting-started/#css) CSS Tippy includes a CSS stylesheet by default for the base tooltip styling, fade animation, CSS arrows, and other required CSS. #### [#](https://tippyjs.bootcss.com/getting-started/#cdn) CDN When including the script link above via CDN, the CSS stylesheet is injected into its own `