Skip to content

Tooltip

ETooltip Tooltips are a useful tool to display additional details about an element when the user hovers over or clicks on it. Demo Here

Usage

vue

<template>
  <ETooltip>
    <template #element>
      <EBtn>Button</EBtn>
    </template>
    <template #content>
      Extra information
    </template>
  </ETooltip>
</template>

Props

For ETooltip component, the following props are available:

PropTypeDefaultNote
clickBooleanfalseOpens Tooltip only on click
hoverBooleanfalseOpens Tooltip only on hover.
widthString-Sets the component's width.
heightString-Sets the component's height.
animationString"component-pop-out"The ETooltip element can be animated in four ways. Defined animations here.
positionString"top"The position prop allows the tooltip to be position relative to the element.The tooltip can appear from the left, right, top or bottom edge of the element.
squareBooleanfalseRemoves rounded corners of the element.
arrowBooleanfalseAdds an arrow to the tooltip.

NOTE

If both hover and click props are true, the tooltip will be displayed on hover and will persist on the page with a click on the element.

The tooltip will disappear again when the user clicks somewhere else on the page.

Slots

The ETooltip component provide following slots that enable you to customize the content.

SlotDescription
elementThe slot used for the tooltip's element.
contentThe slot used for the tooltip's content.

COPYRIGHT