# Tooltips > Documentation and examples for adding custom BootstrapVue tooltips, using Bootstrap v4 CSS for > styling and animations. Tooltips can be triggered by hovering, focusing, or clicking an element ## Overview Use the `v-b-tooltip` directive on any element or component where you would like a tooltip to appear. ```html
Hover Me
``` Things to know when using the tooltip directive: - Tooltips rely on the 3rd party library [Popper.js](https://popper.js.org/) for positioning. - Tooltips require BootstrapVue's custom SCSS/CSS in order to function correctly, and for variants. - If a title is not provided (or is an empty string), the tooltip will not show. - Specify container: 'body' (the default) to avoid rendering problems in more complex components (like input groups, button groups, etc.). - Triggering tooltips on hidden elements will not work. - Tooltips for `disabled` elements must be triggered on a wrapper element. - When triggered from hyperlinks that span multiple lines, tooltips will be centered. Use white-space: nowrap; on your ``s, ``s and ``s to avoid this behavior. - Tooltips must be hidden before their corresponding elements have been removed from the DOM. ## Positioning Twelve options are available for positioning: `top`, `topleft`, `topright`, `right`, `righttop`, `rightbottom`, `bottom`, `bottomleft`, `bottomright`, `left`, `lefttop`, and `leftbottom` aligned. The default position is `top`. Positioning is relative to the trigger element.
**Live example** ```html
Top Right Left Bottom Top right Top left Bottom right Bottom left Left top Left bottom Right top Right bottom
``` ## Triggers Tooltips can be triggered (opened/closed) via any combination of `click`, `hover` and `focus`. The default trigger is `hover focus`. Or a trigger of manual can be specified, where the popover can only be opened or closed [programmatically](#hiding-and-showing-tooltips-via-root-events). If a tooltip has more than one trigger, then all triggers must be cleared before the tooltip will close. I.e. if a tooltip has the trigger `focus click`, and it was opened by `focus`, and the user then clicks the trigger element, they must click it again **and** move focus to close the tooltip. ```html
Hover + Focus Hover Click Focus
``` ### Making tooltips work for keyboard and assistive technology users You should only add tooltips to HTML elements that are traditionally keyboard-focusable and interactive (such as links, buttons, or form controls). Although arbitrary HTML elements (such as ``s) can be made focusable by adding the `tabindex="0"` attribute, this will add potentially annoying and confusing tab stops on non-interactive elements for keyboard users. In addition, most assistive technologies currently do not announce the tooltip in this situation. Additionally, do not rely solely on `hover` as the trigger for your tooltip, as this will make your tooltips _impossible to trigger for keyboard-only users_. ### Disabled elements Elements with the `disabled` attribute aren’t interactive, meaning users cannot focus, hover, or click them to trigger a tooltip (or popover). As a workaround, you’ll want to trigger the tooltip from a wrapper `
` or ``, ideally made keyboard-focusable using `tabindex="0"`, and override the `pointer-events` on the disabled element. ```html
Disabled button
``` ### Caveats with `focus` trigger on `