Skip to content
On this page

Tooltip ​

Brief, contextual, and non-intrusive pop-up message that provides supplementary information when hovering over an element in a user interface

The Component ​

Hover me
Hover me
This is a tooltip
This tooltip follows the mouse

Usage ​

The tooltip is positioned using popper.js. Use in combination with the useTooltip composition function to set the tooltip info object.

To make the tooltip follow the mouse instead of being positioned on an element, set the followMouse prop to true.

Data ​

Tooltip info object passed to setTooltip function from useTooltip composable:

js
{
  target: Element,
  data: {}
}

Optional: meta

Props ​

NameDefaultDescriptionType
currentPage1The currently active pageNumber
totalItems100The total number of resultsNumber
itemsPerPage10The number of results shown per pageNumber
currentPageClasspage-btn-currentClass for the currently active pageString

Events ​

NameArgumentDescription
@changePagepage numberEmitted when page is changed

Dependencies ​

  • @popperjs/core
  • useTooltip function